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 property | A rule matching an error code. |
messagePattern property | |
kind property | |
message static | Matches TM1's message, case-insensitively. |
code static | Matches TM1's error code. |
matches | @internal |
Rule
constructorconstructor( readonly status: number | undefined, readonly code: string | undefined, readonly messagePattern: RegExp | undefined, readonly kind: Tm1ErrorKind, )status
propertyreadonly status: number | undefinedcode
propertyreadonly code: string | undefinedA rule matching an error code.
messagePattern
propertyreadonly messagePattern: RegExp | undefinedkind
propertyreadonly kind: Tm1ErrorKindmessage
staticstatic message(regex: string, kind: Tm1ErrorKind): RuleMatches TM1's message, case-insensitively.
code
staticstatic code(code: string, kind: Tm1ErrorKind): RuleMatches TM1's error code.
matches
matches(status: number, error: ODataError | undefined): boolean@internal