skipcheck

TM1 client · Docs · Errors

Tm1ApiException

import io.skipcheck.tm1.client.error.Tm1ApiException;

TM1 answered with an error status. Carries the status, the parsed OData error and what it means (kind). The subclass follows from the kind first and the status second, so a "not found" TM1 reports as a 400 is still a Tm1NotFoundException.

Members

of staticThe exception for an error response, classified with classifier.
of staticThe exception for an error response whose kind is already known.
isRetryableTrue for statuses where trying again later may work.
mayHaveAppliedFalse for client errors (4xx), which TM1 rejected; true for server errors, except 501.
statusThe HTTP status.
kindWhat the error means.
errorThe OData error body, or null if the response didn't have one.

of

static
static Tm1ApiException of(int status, ODataError error, String method, String url, Tm1ErrorClassifier classifier)

The exception for an error response, classified with classifier.

Parameters

status
the HTTP status
error
the parsed error body, or null if the body wasn't an OData error
method
the request's HTTP method
url
the request's URL, without credentials
classifier
works out the error's kind from the status and body

Returns

the subclass matching the kind and status

of

static
static Tm1ApiException of(int status, Tm1ErrorKind kind, ODataError error, String method, String url)

The exception for an error response whose kind is already known.

Parameters

status
the HTTP status
kind
what the error means
error
the parsed error body, or null if the body wasn't an OData error
method
the request's HTTP method
url
the request's URL, without credentials

Returns

the subclass matching the kind first and the status second

isRetryable

boolean isRetryable()

True for statuses where trying again later may work: 429, 502, 503 and 504.

mayHaveApplied

boolean mayHaveApplied()

False for client errors (4xx), which TM1 rejected; true for server errors, except 501.

status

int status()

The HTTP status.

Returns

the status code, such as 404

kind

Tm1ErrorKind kind()

What the error means.

Returns

the kind, never null

error

ODataError error()

The OData error body, or null if the response didn't have one.

Returns

the error, or null

Also in the Javadoc.