Skip to main content
Version: v0.0.2

Class: ServicesReview278BuildError

Thrown by "./build-278.js".build278Request / "./build-278.js".build278Response when the supplied services-review spec cannot be emitted as a conformant, self-consistent 278 - most importantly when its nested tree cannot form a valid HL hierarchy, or when a response's HCR certification action is missing the verbatim actionCode the builder is forbidden to infer. Carries a stable code for programmatic narrowing. Deliberately does NOT extend X12ParseError or X12BuildError - the domain-refusal distinction matters at the type level.

Example

import { ServicesReview278BuildError } from "@cosyte/x12";
try {
build278Request(spec);
} catch (err) {
if (err instanceof ServicesReview278BuildError) {
// err.code is one of AUTH_278_BUILD_ERROR_CODES
}
}

Extends

  • Error

Constructors

Constructor

new ServicesReview278BuildError(code, message): ServicesReview278BuildError

Internal

Parameters

code

ServicesReview278BuildErrorCode

message

string

Returns

ServicesReview278BuildError

Overrides

Error.constructor

Properties

code

readonly code: ServicesReview278BuildErrorCode