Package com.aquima.web.api.controller.v2
Class ApiExceptionHandler
java.lang.Object
com.aquima.web.api.controller.v2.ApiExceptionHandler
@Component("v2ApiExceptionHandler")
@ControllerAdvice(basePackageClasses=AbstractBaseController.class)
@ServerContext
public class ApiExceptionHandler
extends Object
Class defines exception handlers for generic exceptions.
These exception can be overwriting when needed by defining a new
ControllerAdvice
with a bigger precedence
Note: It should not contain specific exceptions !- Since:
- 11.2
- Author:
- Mihai Bob
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<JsonError> handleAuthorizationException
(com.aquima.interactions.portal.exception.FlowAuthorizationException exception) handleGenericException
(Exception exception) handleIllegalStateException
(IllegalStateException exception) handlePortalException
(Exception exception)
-
Field Details
-
Constructor Details
-
Method Details
-
handleIllegalStateException
@ExceptionHandler(java.lang.IllegalStateException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handleIllegalStateException(IllegalStateException exception) -
handlePortalException
-
handleAuthorizationException
@ExceptionHandler(com.aquima.interactions.portal.exception.FlowAuthorizationException.class) @ResponseBody public org.springframework.http.ResponseEntity<JsonError> handleAuthorizationException(com.aquima.interactions.portal.exception.FlowAuthorizationException exception) -
handleCsrfException
@ExceptionHandler(CsrfException.class) @ResponseStatus(FORBIDDEN) @ResponseBody public JsonError handleCsrfException(CsrfException ex) -
handleGenericException
@ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handleGenericException(Exception exception)
-