skipcheck

TM1 client · Docs · Errors

ODataError

from skipcheck_tm1.errors import ODataError

An OData error response body: {"error":{"code":"278","message":"..."}}.

TM1 uses code 278 for most errors (not found, bad request, precondition failed and not implemented alike), so the code alone rarely identifies an error. See Tm1ErrorClassifier.

Members

code
message
target
details
inner_error
from_json staticThe error in a parsed JSON body ({"error".
from_text staticTM1's plain-text error.
parse staticAn error response's body.

code

code: str

message

message: str

target

target: str | None

details

details: tuple[ODataError, ...]

inner_error

inner_error: Any

from_json

static
from_json(body: Any) -> ODataError | None

The error in a parsed JSON body ({"error": {...}} or the object itself), or None if it isn't one (Java's ODataError.from).

from_text

static
from_text(body: str) -> ODataError | None

TM1's plain-text error: its lines but the Error: … status line, joined, at most 1000 characters (and an ellipsis).

parse

static
parse(body: bytes | str | None) -> ODataError | None

An error response's body: OData JSON, else plain text.