Class Tm1ProtocolException

All Implemented Interfaces:
Serializable

public final class Tm1ProtocolException extends Tm1Exception
TM1's response couldn't be read: malformed or truncated JSON, an unexpected shape, or an error reported in the middle of a response that started as a success. OData says a client must treat such a response as failed as a whole (Part 1 §9.5), so any items already delivered from it should be treated as incomplete.
See Also:
  • Constructor Details

    • Tm1ProtocolException

      public Tm1ProtocolException(String message, @Nullable ODataError error, @Nullable String method, @Nullable String url, @Nullable Throwable cause)
      Creates an exception for a response that couldn't be read.
      Parameters:
      message - what was wrong with the response; the method and URL are appended
      error - the error TM1 reported in the response, or null
      method - the request's HTTP method, or null if not known
      url - the request's URL, without credentials, or null if not known
      cause - the underlying failure, such as a parse error, or null
  • Method Details

    • isRetryable

      public boolean isRetryable()
      Description copied from class: Tm1Exception
      Whether sending the same request again could succeed, such as after a timeout or a 503.
      Specified by:
      isRetryable in class Tm1Exception
      Returns:
      true if a retry could succeed
    • mayHaveApplied

      public boolean mayHaveApplied()
      True: the server got the request and started answering.
      Specified by:
      mayHaveApplied in class Tm1Exception
      Returns:
      false only if TM1 certainly didn't act on the request
    • error

      public @Nullable ODataError error()
      The error TM1 reported in the response, if it reported one.
      Returns:
      the error, or null