Class BankIdApiUnexpectedResponseException

All Implemented Interfaces:
Serializable

public final class BankIdApiUnexpectedResponseException extends BankIdException
This class represents a specific exception to be used when an unexpected API response is received in the interaction with the BankId system. It extends BankIdException class and inherits its behavior.

The class will store and provide the HttpResponse.ResponseInfo and the String representation of the response body for debug and error diagnosis.

See Also:
  • Method Details

    • of

      public static BankIdApiUnexpectedResponseException of(HttpResponse.ResponseInfo responseInfo, String responseBody, Throwable cause)
      Creates a new instance of BankIdApiUnexpectedResponseException.
      Parameters:
      responseInfo - The response information associated with the exception.
      responseBody - The response body associated with the exception.
      cause - The cause of the exception.
      Returns:
      A new instance of BankIdApiUnexpectedResponseException.
    • getResponseInfo

      public HttpResponse.ResponseInfo getResponseInfo()
      Retrieves the response information associated with an exception thrown during interaction with the BankId system.
      Returns:
      The response information.
    • getResponseBody

      public String getResponseBody()
      Retrieves the response body associated with the exception.
      Returns:
      The response body.