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 static | The rules this client knows about. |
WithRule | This classifier with rule tried first. |
Classify | Classifies an error response. |
Defaults
staticTm1ErrorClassifier 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.