Class Tm1ProtocolException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.skipcheck.tm1.client.error.Tm1Exception
io.skipcheck.tm1.client.error.Tm1ProtocolException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionTm1ProtocolException(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. -
Method Summary
Modifier and TypeMethodDescription@Nullable ODataErrorerror()The error TM1 reported in the response, if it reported one.booleanWhether sending the same request again could succeed, such as after a timeout or a 503.booleanTrue: the server got the request and started answering.Methods inherited from class Tm1Exception
method, urlMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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 appendederror- the error TM1 reported in the response, ornullmethod- the request's HTTP method, ornullif not knownurl- the request's URL, without credentials, ornullif not knowncause- the underlying failure, such as a parse error, ornull
-
-
Method Details
-
isRetryable
public boolean isRetryable()Description copied from class:Tm1ExceptionWhether sending the same request again could succeed, such as after a timeout or a 503.- Specified by:
isRetryablein classTm1Exception- Returns:
trueif a retry could succeed
-
mayHaveApplied
public boolean mayHaveApplied()True: the server got the request and started answering.- Specified by:
mayHaveAppliedin classTm1Exception- Returns:
falseonly if TM1 certainly didn't act on the request
-
error
The error TM1 reported in the response, if it reported one.- Returns:
- the error, or
null
-