Package com.aquima.web.api.controller.v1
Class ApiExceptionHandler
- java.lang.Object
-
- com.aquima.web.api.controller.v1.ApiExceptionHandler
-
@Component("v1ApiExceptionHandler") @ControllerAdvice(basePackageClasses=AbstractBaseController.class) @Order(2147483647) @ServerContext public class ApiExceptionHandler extends Object
Class defines exception handlers for generic exceptions. These exception can be overwriting when needed by defining a newControllerAdvice
with a bigger precedence Note: It should not contain specific exceptions !- Since:
- 11.2
- Author:
- Mihai Bob
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_OCCURRED_MESSAGE
-
Constructor Summary
Constructors Constructor Description ApiExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonError
handleGenericException(Exception exception)
JsonError
handleIllegalStateException(IllegalStateException exception)
JsonError
handlePortalException(Exception exception)
-
-
-
Field Detail
-
ERROR_OCCURRED_MESSAGE
public static final String ERROR_OCCURRED_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
handleIllegalStateException
@ExceptionHandler(java.lang.IllegalStateException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handleIllegalStateException(IllegalStateException exception)
-
handlePortalException
@ExceptionHandler(com.aquima.interactions.portal.exception.PortalException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handlePortalException(Exception exception)
-
handleGenericException
@ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handleGenericException(Exception exception)
-
-