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
public class D4ScienceIAMClientException extends Exception
Exception thrown by D4Science IAM client operations.- Author:
- Luca Frosini (ISTI-CNR)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description D4ScienceIAMClientException(String message, Throwable cause)Creates a new exception with the specified message and cause.D4ScienceIAMClientException(Throwable cause)Creates a new exception with the specified cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()Returns the content type if the cause is a KeycloakClientException.StringgetResponseString()Returns the response string if the cause is a KeycloakClientException.intgetStatus()Returns the HTTP status code if the cause is a KeycloakClientException.booleanhasJSONPayload()Checks 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 Detail
-
D4ScienceIAMClientException
public D4ScienceIAMClientException(Throwable cause)
Creates a new exception with the specified cause.- Parameters:
cause- the underlying cause
-
-
Method Detail
-
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
public String 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
public String getResponseString()
Returns the response string if the cause is a KeycloakClientException.- Returns:
- the response string, or null if not available
-
-