Variable: SCRIPT_FATAL_CODES
constSCRIPT_FATAL_CODES:object
Fatal error codes for NCPDP SCRIPT parsing. A fatal is reserved for unrecoverable structural corruption: input that cannot be treated as a SCRIPT message at all. Everything recoverable is a warning instead (see "./warnings".SCRIPT_WARNING_CODES).
Type Declaration
EMPTY_INPUT
readonlyEMPTY_INPUT:"EMPTY_INPUT"="EMPTY_INPUT"
Input is empty or whitespace-only.
NO_MESSAGE_ROOT
readonlyNO_MESSAGE_ROOT:"NCPDP_SCRIPT_NO_MESSAGE_ROOT"="NCPDP_SCRIPT_NO_MESSAGE_ROOT"
Well-formed XML, but the root element is not a SCRIPT <Message>.
NOT_XML
readonlyNOT_XML:"NCPDP_SCRIPT_NOT_XML"="NCPDP_SCRIPT_NOT_XML"
Input is not well-formed XML, or carries a forbidden DOCTYPE/ENTITY.
UNSUPPORTED_VERSION
readonlyUNSUPPORTED_VERSION:"NCPDP_SCRIPT_UNSUPPORTED_VERSION"="NCPDP_SCRIPT_UNSUPPORTED_VERSION"
The declared SCRIPT version predates the XML SCRIPT era and is unsupported.
Example
import { SCRIPT_FATAL_CODES } from "@cosyte/ncpdp/common";
SCRIPT_FATAL_CODES.NOT_XML; // "NCPDP_SCRIPT_NOT_XML"