Package io.micronaut.http.annotation
Annotation Type Error
-
@Documented @Retention(RUNTIME) @Target(METHOD) @HttpMethodMapping @Inherited public @interface Error
Annotation that can be applied to method to map it to an error route.- Since:
- 1.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<? extends java.lang.Throwable>
exception
boolean
global
Whether the error handler should be registered as a global error handler or just locally to the declaringController
.HttpStatus
status
java.lang.Class<? extends java.lang.Throwable>
value
-
-
-
-
status
HttpStatus status
- Returns:
- The
HttpStatus
code to map
- Default:
- io.micronaut.http.HttpStatus.INTERNAL_SERVER_ERROR
-
-
-
global
boolean global
Whether the error handler should be registered as a global error handler or just locally to the declaringController
.- Returns:
- True if it should be global
- Default:
- false
-
-