skipcheck

TM1 client · Docs · Errors

ODataError

using Skipcheck.Tm1.Client.Errors;

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

ODataError constructorAn error body.
Code propertyTM1's error code, or empty.
Message propertyTM1's message, or empty.
Target propertyWhat the error applies to, or null.
Details propertyFurther errors; empty if there are none.
InnerError propertyThe server's own extra information (innererror), or null.
From staticThe error in a JSON body, wrapped in error or not; null if it isn't one.
FromText staticThe error in a plain-text body, as TM1 sends some (its Error.
Parse staticThe error in a response body, whatever its form.
Equals
GetHashCode

ODataError

constructor
ODataError(string? code, string? message, string? target = null, IReadOnlyList<ODataError>? details = null, JsonElement? innerError = null)

An error body. A null code or message reads as an empty string.

Parameters

code
The error code, as text.
message
The message.

Code

property
string Code

TM1's error code, or empty.

Message

property
string Message

TM1's message, or empty.

Target

property
string? Target

What the error applies to, or null.

Details

property
IReadOnlyList<ODataError> Details

Further errors; empty if there are none.

InnerError

property
JsonElement? InnerError

The server's own extra information (innererror), or null.

From

static
ODataError? From(JsonElement? body)

The error in a JSON body, wrapped in error or not; null if it isn't one.

FromText

static
ODataError? FromText(string body)

The error in a plain-text body, as TM1 sends some (its Error: lines dropped, the rest joined on one line and cut at 1000 characters); null if there's no text.

Parse

static
ODataError? Parse(byte[]? body)

The error in a response body, whatever its form: JSON, then plain text; null if empty.

Equals

bool Equals(ODataError? other)

GetHashCode

int GetHashCode()