Module dev.eidentification.bankid
Class BankIdApiUnexpectedResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.eidentification.bankid.exceptions.BankIdException
dev.eidentification.bankid.exceptions.BankIdApiUnexpectedResponseException
- All Implemented Interfaces:
Serializable
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 Summary
Modifier and TypeMethodDescriptionRetrieves the response body associated with the exception.Retrieves the response information associated with an exception thrown during interaction with the BankId system.of
(HttpResponse.ResponseInfo responseInfo, String responseBody, Throwable cause) Creates a new instance of BankIdApiUnexpectedResponseException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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
Retrieves the response information associated with an exception thrown during interaction with the BankId system.- Returns:
- The response information.
-
getResponseBody
Retrieves the response body associated with the exception.- Returns:
- The response body.
-