Package com.glideidentity.exception
Class MagicalAuthError
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.glideidentity.exception.MagicalAuthError
- All Implemented Interfaces:
Serializable
API error from Magical Auth operations.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMagicalAuthError(String code, int status, String message) Creates an error with the specified details.MagicalAuthError(Map<String, Object> response) Creates an error from an API response. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()intbooleanChecks if this error matches the specified code.booleanIndicates whether this error can be retried.voidsetDetails(Map<String, Object> details) voidsetRequestId(String requestId) toString()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
MagicalAuthError
Creates an error with the specified details.- Parameters:
code- error codestatus- HTTP status codemessage- error message
-
MagicalAuthError
Creates an error from an API response.- Parameters:
response- parsed error response
-
-
Method Details
-
getCode
-
getStatus
public int getStatus() -
getRequestId
-
setRequestId
-
getDetails
-
setDetails
-
is
Checks if this error matches the specified code.- Parameters:
errorCode- code to check- Returns:
- true if codes match
-
isRetryable
public boolean isRetryable()Indicates whether this error can be retried.- Returns:
- true if the operation may succeed on retry
-
toString
-