skipcheck

TM1 client · Docs · Errors

Tm1ErrorClassifier.Rule

import { Tm1ErrorClassifier } from "@skipcheck/tm1-client";

One classification rule. Each condition that's set must match: the status if not null, the code exactly, and the message pattern (case-insensitive, anywhere in the message).

Members

Rule constructor
status property
code propertyA rule matching an error code.
messagePattern property
kind property
message staticMatches TM1's message, case-insensitively.
code staticMatches TM1's error code.
matches@internal

Rule

constructor
constructor( readonly status: number | undefined, readonly code: string | undefined, readonly messagePattern: RegExp | undefined, readonly kind: Tm1ErrorKind, )

status

property
readonly status: number | undefined

code

property
readonly code: string | undefined

A rule matching an error code.

messagePattern

property
readonly messagePattern: RegExp | undefined

kind

property
readonly kind: Tm1ErrorKind

message

static
static message(regex: string, kind: Tm1ErrorKind): Rule

Matches TM1's message, case-insensitively.

code

static
static code(code: string, kind: Tm1ErrorKind): Rule

Matches TM1's error code.

matches

matches(status: number, error: ODataError | undefined): boolean

@internal