Annotation Interface MapToStatusCode


@Retention(RUNTIME) @Target(TYPE) public @interface MapToStatusCode
Maps an exception to an HTTP status code. When this exception gets thrown during the execution of a controller, return a response with this status code and the exception message.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
     
  • Element Details

    • value

      int value
      Returns:
      The status code to map this exception to.