Class IdAClientException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.io7m.idstore.error_codes.IdException
com.io7m.idstore.admin_client.api.IdAClientException
- All Implemented Interfaces:
com.io7m.seltzer.api.SStructuredErrorExceptionType<IdErrorCode>
,com.io7m.seltzer.api.SStructuredErrorType<IdErrorCode>
,Serializable
The type of client exceptions.
- See Also:
-
Constructor Summary
ConstructorDescriptionIdAClientException
(String message, IdErrorCode inErrorCode, Map<String, String> inAttributes, Optional<String> inRemediatingAction, Optional<UUID> inRequestId) Construct an exception.IdAClientException
(String message, Throwable cause, IdErrorCode inErrorCode, Map<String, String> inAttributes, Optional<String> inRemediatingAction, Optional<UUID> inRequestId) Construct an exception. -
Method Summary
Modifier and TypeMethodDescriptionstatic IdAClientException
ofError
(IdAResponseError error) Transform an error response to an exception.static IdAClientException
ofException
(Throwable ex) Construct an exception from an existing exception.Methods inherited from class com.io7m.idstore.error_codes.IdException
attributes, errorCode, exception, remediatingAction
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.seltzer.api.SStructuredErrorExceptionType
getMessage, message
-
Constructor Details
-
IdAClientException
public IdAClientException(String message, IdErrorCode inErrorCode, Map<String, String> inAttributes, Optional<String> inRemediatingAction, Optional<UUID> inRequestId) Construct an exception.- Parameters:
message
- The messageinErrorCode
- The error codeinAttributes
- The error attributesinRemediatingAction
- The remediating action, if anyinRequestId
- The request ID
-
IdAClientException
public IdAClientException(String message, Throwable cause, IdErrorCode inErrorCode, Map<String, String> inAttributes, Optional<String> inRemediatingAction, Optional<UUID> inRequestId) Construct an exception.- Parameters:
message
- The messagecause
- The causeinErrorCode
- The error codeinAttributes
- The error attributesinRemediatingAction
- The remediating action, if anyinRequestId
- The request ID
-
-
Method Details
-
ofException
Construct an exception from an existing exception.- Parameters:
ex
- The cause- Returns:
- The new exception
-
requestId
- Returns:
- The ID associated with the request, if the server returned one
-
ofError
Transform an error response to an exception.- Parameters:
error
- The error- Returns:
- The exception
-