Class PowerAuthExceptionHandler
- java.lang.Object
-
- io.getlime.security.powerauth.rest.api.spring.exception.PowerAuthExceptionHandler
-
@ControllerAdvice @Order(-100) public class PowerAuthExceptionHandler extends java.lang.ObjectImplementation of a PA2.0 Standard RESTful API exception handler.- Author:
- Petr Dvorak, petr@wultra.com
-
-
Field Summary
Fields Modifier and Type Field Description static intPRECEDENCE
-
Constructor Summary
Constructors Constructor Description PowerAuthExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.getlime.core.rest.model.base.response.ErrorResponsehandleActivationException(java.lang.Exception ex)Handle PowerAuthActivationException exceptions.io.getlime.core.rest.model.base.response.ErrorResponsehandlePowerAuthEncryptionException(java.lang.Exception ex)Handle PowerAuthEncryptionException exceptions.io.getlime.core.rest.model.base.response.ErrorResponsehandlePowerAuthUpgradeException(java.lang.Exception ex)Handle PowerAuthUpgradeException exceptions.io.getlime.security.powerauth.rest.api.model.exception.RecoveryErrorResponsehandleRecoveryException(java.lang.Exception ex)Handle PowerAuthRecoveryException exceptions.io.getlime.core.rest.model.base.response.ErrorResponsehandleSecureVaultException(java.lang.Exception ex)Handle PowerAuthSecureVaultException exceptions.io.getlime.core.rest.model.base.response.ErrorResponsehandleUnauthorizedException(java.lang.Exception ex)Handle PowerAuthAuthenticationException exceptions.
-
-
-
Field Detail
-
PRECEDENCE
public static final int PRECEDENCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
handleUnauthorizedException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.base.exception.PowerAuthAuthenticationException.class) @ResponseStatus(UNAUTHORIZED) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handleUnauthorizedException(java.lang.Exception ex)
Handle PowerAuthAuthenticationException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handleActivationException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.base.exception.PowerAuthActivationException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handleActivationException(java.lang.Exception ex)
Handle PowerAuthActivationException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handleRecoveryException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.base.exception.PowerAuthRecoveryException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.security.powerauth.rest.api.model.exception.RecoveryErrorResponse handleRecoveryException(java.lang.Exception ex)
Handle PowerAuthRecoveryException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handleSecureVaultException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.base.exception.PowerAuthSecureVaultException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handleSecureVaultException(java.lang.Exception ex)
Handle PowerAuthSecureVaultException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handlePowerAuthEncryptionException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.base.exception.PowerAuthEncryptionException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handlePowerAuthEncryptionException(java.lang.Exception ex)
Handle PowerAuthEncryptionException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
handlePowerAuthUpgradeException
@ExceptionHandler(io.getlime.security.powerauth.rest.api.base.exception.PowerAuthUpgradeException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public io.getlime.core.rest.model.base.response.ErrorResponse handlePowerAuthUpgradeException(java.lang.Exception ex)
Handle PowerAuthUpgradeException exceptions.- Parameters:
ex- Exception instance.- Returns:
- Error response.
-
-