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 ​
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 ​
Properties ​
cause? ​
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from ​
code ​
readonlycode:"EINV-UNSUPPORTED-DOCUMENT"
Defined in: packages/core/src/errors.ts:113
Stable, machine-readable identifier of the failure.
Overrides ​
message ​
message:
string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from ​
name ​
name:
string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from ​
namespace ​
readonlynamespace:string
Defined in: packages/core/src/errors.ts:116
Namespace URI of the root element; the empty string when it has none.
rootName ​
readonlyrootName:string
Defined in: packages/core/src/errors.ts:119
Local name of the root element.
stack? ​
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076