Tm1ApiException
import { Tm1ApiException } from "@skipcheck/tm1-client"; 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
Tm1ApiException constructor | @internal Made by Tm1ApiException.of. |
status property | The HTTP status. |
kind property | What the error means. |
error property | TM1's error, when the response had one. |
of static | The exception for a refused request. |
fromBody static | @internal The exception for an error status and its body (JSON or TM1's plain text). |
isRetryable | 429, 502, 503 and 504. |
mayHaveApplied | A 5xx other than 501. |
method property | The request's HTTP method, when the failure is a request's. |
url property | The request's URL, when the failure is a request's. |
Tm1ApiException
constructorconstructor( readonly status: number, readonly kind: Tm1ErrorKind, readonly error: ODataError | undefined, method: string, url: string, )@internal Made by Tm1ApiException.of.
status
propertyreadonly status: numberThe HTTP status.
kind
propertyreadonly kind: Tm1ErrorKindWhat the error means.
error
propertyreadonly error: ODataError | undefinedTM1's error, when the response had one.
of
staticstatic of(status: number, kindOrClassifier: Tm1ErrorKind | Tm1ErrorClassifier, error: ODataError | undefined, method: string, url: string): Tm1ApiExceptionThe exception for a refused request: its kind given, or from classifier; of the class the kind calls for.
fromBody
staticstatic fromBody(status: number, body: Uint8Array | string | undefined, method: string, url: string, classifier: Tm1ErrorClassifier): Tm1ApiException@internal The exception for an error status and its body (JSON or TM1's plain text).
isRetryable
isRetryable(): boolean429, 502, 503 and 504: TM1 (or a proxy before it) is busy or restarting.
mayHaveApplied
mayHaveApplied(): booleanA 5xx other than 501: TM1 may have failed after applying the change.
method
propertymethod: string | undefinedThe request's HTTP method, when the failure is a request's.
url
propertyurl: string | undefinedThe request's URL, when the failure is a request's.