Class JsonEmbeddedException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class JsonEmbeddedException
    extends java.io.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 Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static JsonEmbeddedException fromJson​(java.lang.String json)
      Deserializes a JsonEmbeddedException from a JSON string.
      int getCode()
      Gets the error code (e.g.
      java.lang.String[] getDetails()
      Gets the further details of the error.
      java.lang.String getMessage()
      Gets the error message.
      byte[] getResponseData()
      Gets the response data associated with the exception.
      void setResponseData​(byte[] responseData)
      Sets the response data associated with the exception.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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
    • 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 java.lang.String getMessage()
        Gets the error message.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        the error message
        Since:
        100.0.0
      • getDetails

        public java.lang.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​(java.lang.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