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:
Mauro Mugnaini (Nubisware S.r.l.)
See Also:
  • Constructor Details

    • D4ScienceIAMClientException

      public D4ScienceIAMClientException(Throwable cause)
      Creates a new exception with the specified cause.
      Parameters:
      cause - the underlying cause
    • D4ScienceIAMClientException

      public D4ScienceIAMClientException(String message, Throwable cause)
      Creates a new exception with the specified message and cause.
      Parameters:
      message - the exception message
      cause - 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

      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