skipcheck

TM1 client · Docs · Errors

Tm1ErrorClassifier

using Skipcheck.Tm1.Client.Errors;

Works out a Tm1ErrorKind from an error response.

TM1's error codes rarely say what went wrong: code 278 covers most failures. So classification is a table of rules, tried in order, matching on HTTP status, code and message. The first match wins, and the HTTP status decides when nothing matches. Matching on message text is a last resort, but TM1 gives nothing better for several errors (impersonation failures, for instance).

The table is data: Defaults holds the rules this client knows, and WithRule adds your own in front of them, e.g. for a message your TM1 version phrases differently.

Members

Defaults staticThe rules this client knows about.
WithRuleThis classifier with rule tried first.
ClassifyClassifies an error response.

Defaults

static
Tm1ErrorClassifier Defaults()

The rules this client knows about.

WithRule

Tm1ErrorClassifier WithRule(Rule rule)

This classifier with rule tried first.

Classify

Tm1ErrorKind Classify(int status, ODataError? error)

Classifies an error response: the first matching rule's kind, or else the kind for the status (Tm1ErrorKind.Other if it has none).

Parameters

status
The HTTP status.
error
The parsed error body, or null if the body wasn't an OData error.