Package org.gcube.common.iam
Class D4ScienceIAMClientException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.gcube.common.iam.D4ScienceIAMClientException
- All Implemented Interfaces:
Serializable
Exception thrown by D4Science IAM client operations.
- Author:
- Luca Frosini (ISTI-CNR)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionD4ScienceIAMClientException(String message, Throwable cause) Creates a new exception with the specified message and cause.Creates a new exception with the specified cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the content type if the cause is a KeycloakClientException.Returns the response string if the cause is a KeycloakClientException.intReturns the HTTP status code if the cause is a KeycloakClientException.booleanChecks if the response has a JSON payload.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
D4ScienceIAMClientException
Creates a new exception with the specified cause.- Parameters:
cause- the underlying cause
-
D4ScienceIAMClientException
Creates a new exception with the specified message and cause.- Parameters:
message- the exception messagecause- the underlying cause
-
-
Method Details
-
getStatus
public int getStatus()Returns the HTTP status code if the cause is a KeycloakClientException.- Returns:
- the HTTP status code, or -1 if not available
-
getContentType
Returns the content type if the cause is a KeycloakClientException.- Returns:
- the content type, or null if not available
-
hasJSONPayload
public boolean hasJSONPayload()Checks if the response has a JSON payload.- Returns:
- true if the response has a JSON payload, false otherwise
-
getResponseString
Returns the response string if the cause is a KeycloakClientException.- Returns:
- the response string, or null if not available
-