Class: Enrollment834BuildError
Thrown by "./build-834.js".build834 when the supplied enrollment
spec cannot be emitted as a conformant, self-consistent 834 - most
importantly when a maintenance type code is outside the validated X12 875
subset. 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 { Enrollment834BuildError } from "@cosyte/x12";
try {
build834(spec);
} catch (err) {
if (err instanceof Enrollment834BuildError) {
// err.code is one of ENROLLMENT_834_BUILD_ERROR_CODES
}
}
Extends
Error
Constructors
Constructor
new Enrollment834BuildError(
code,message):Enrollment834BuildError
Internal
Parameters
code
message
string
Returns
Enrollment834BuildError
Overrides
Error.constructor
Properties
code
readonlycode:Enrollment834BuildErrorCode