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>exceptionbooleanglobalWhether the error handler should be registered as a global error handler or just locally to the declaringController.HttpStatusstatusjava.lang.Class<? extends java.lang.Throwable>value
-
-
-
-
status
HttpStatus status
- Returns:
- The
HttpStatuscode 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
-
-