Class AuthorizationPossibleErrorHandler


  • @Service
    public class AuthorizationPossibleErrorHandler
    extends Object
    Special service to parse ASPSP authorization responses on certain error conditions. For example used to catch exception on wrong PIN/password input and if it is retryable to swallow the exception and call fallback routine.
    • Constructor Detail

      • AuthorizationPossibleErrorHandler

        public AuthorizationPossibleErrorHandler()
    • Method Detail

      • handlePossibleAuthorizationError

        public void handlePossibleAuthorizationError​(Runnable tryAuthorize,
                                                     Consumer<de.adorsys.xs2a.adapter.service.exception.ErrorResponseException> onFail)
        Swallows retryable (like wrong password) authorization exceptions.
        Parameters:
        tryAuthorize - Authorization function to call
        onFail - Fallback function to call if retryable exception occurred.