Skip to content

Documentation / @facturometro/einvoice / UnsupportedDocumentError

Class: UnsupportedDocumentError ​

Defined in: packages/core/src/errors.ts:112

The XML is well-formed but its root element is neither a UBL Invoice nor a UBL CreditNote.

Example ​

ts
import { NS, UnsupportedDocumentError } from '@facturometro/core';

throw new UnsupportedDocumentError({ namespace: NS.cac, rootName: 'Order' });

Extends ​

Constructors ​

Constructor ​

new UnsupportedDocumentError(root, options?): UnsupportedDocumentError

Defined in: packages/core/src/errors.ts:129

Creates an unsupported document error.

Parameters ​

root ​

The root element that was found.

namespace ​

string

Namespace URI of the root element.

rootName ​

string

Local name of the root element.

options? ​

ErrorOptions

Standard error options, in particular cause.

Returns ​

UnsupportedDocumentError

Overrides ​

EInvoiceError.constructor

Properties ​

cause? ​

optional cause?: unknown

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from ​

EInvoiceError.cause


code ​

readonly code: "EINV-UNSUPPORTED-DOCUMENT"

Defined in: packages/core/src/errors.ts:113

Stable, machine-readable identifier of the failure.

Overrides ​

EInvoiceError.code


message ​

message: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from ​

EInvoiceError.message


name ​

name: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from ​

EInvoiceError.name


namespace ​

readonly namespace: string

Defined in: packages/core/src/errors.ts:116

Namespace URI of the root element; the empty string when it has none.


rootName ​

readonly rootName: string

Defined in: packages/core/src/errors.ts:119

Local name of the root element.


stack? ​

optional stack?: string

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from ​

EInvoiceError.stack

MIT licensed. Specification artefacts belong to OpenPEPPOL, CEN and OASIS.