Package org.bremersee.exception
Interface RestApiExceptionMapper
-
- All Known Implementing Classes:
RestApiExceptionMapperImpl
@Validated public interface RestApiExceptionMapper
Maps the error response into aRestApiException
.- Author:
- Christian Bremer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull org.bremersee.exception.model.RestApiException
build(@NotNull Throwable exception, String requestPath, Object handler)
Build the exception model from the exception, the requested path and an handler.@NotNull org.springframework.http.HttpStatus
detectHttpStatus(@NotNull Throwable exception, Object handler)
Detects the http status.@NotNull List<String>
getApiPaths()
Gets the paths this mapper is responsible for.
-
-
-
Method Detail
-
getApiPaths
@NotNull @NotNull List<String> getApiPaths()
Gets the paths this mapper is responsible for.- Returns:
- the list of paths (typically ant paths)
-
build
@NotNull @NotNull org.bremersee.exception.model.RestApiException build(@NotNull @NotNull Throwable exception, @Nullable String requestPath, @Nullable Object handler)
Build the exception model from the exception, the requested path and an handler. Typically the handler is of typeHandlerMethod
.- Parameters:
exception
- the exception (required)requestPath
- the requested path (optional)handler
- the handler (optional)- Returns:
- the rest api exception
-
-