Class JsonEmbeddedException

  • All Implemented Interfaces:
    Serializable

    public final class JsonEmbeddedException
    extends IOException
    Represents a json embedded error from a service response, typically indicates a token secured service that wasn't properly authenticated.
    Since:
    100.0.0
    See Also:
    Serialized Form
    • Method Detail

      • getCode

        public int getCode()
        Gets the error code (e.g. 498 = invalid token)
        Returns:
        the error code
        Since:
        100.0.0
      • getMessage

        public String getMessage()
        Gets the error message.
        Overrides:
        getMessage in class Throwable
        Returns:
        the error message
        Since:
        100.0.0
      • getDetails

        public String[] getDetails()
        Gets the further details of the error.
        Returns:
        the details of the error
        Since:
        100.0.0
      • getResponseData

        public byte[] getResponseData()
        Gets the response data associated with the exception.
        Returns:
        the response data as a byte array
        Since:
        100.0.0
      • setResponseData

        public void setResponseData​(byte[] responseData)
        Sets the response data associated with the exception.
        Parameters:
        responseData -
        Since:
        100.0.0
      • fromJson

        public static JsonEmbeddedException fromJson​(String json)
        Deserializes a JsonEmbeddedException from a JSON string.
        Parameters:
        json - the JSON string to deserialize
        Returns:
        a JsonEmbeddedException or null
        Since:
        100.0.0