Skip to content

Interface: DataIssue ​

Defined in: yang/dist/errors.d.ts:31

One problem found in instance data, with where it is.

Properties ​

appTag? ​

ts
readonly appTag?: string;

Defined in: yang/dist/errors.d.ts:68

The error-app-tag a protocol would report: the must's own, or the one RFC 7950 §15 defines (must-violation, instance-required, data-not-unique, too-many-elements, too-few-elements, missing-choice).


code ​

ts
readonly code: string;

Defined in: yang/dist/errors.d.ts:41

Stable, machine-readable code. Reading data: unknown-node, wrong-namespace, invalid-value, missing-key, duplicate-node, duplicate-entry, unexpected-content, unknown-annotation, xml-syntax, json-syntax, and so on. Validating it: when-false, must-violation, missing-instance, not-unique, too-few-elements, too-many-elements, missing-mandatory, missing-choice, multiple-cases, duplicate-entry, missing-parent, xpath-error.


expression? ​

ts
readonly expression?: string;

Defined in: yang/dist/errors.d.ts:70

The must or when expression that failed.


location? ​

ts
readonly location?: SourceLocation;

Defined in: yang/dist/errors.d.ts:72

Where that expression, or the constraint, is defined.


message ​

ts
readonly message: string;

Defined in: yang/dist/errors.d.ts:42


missingChoice? ​

ts
readonly missingChoice?: string;

Defined in: yang/dist/errors.d.ts:76

For missing-choice: the choice's name (RFC 7950 §15.6).


nonUnique? ​

ts
readonly nonUnique?: readonly string[];

Defined in: yang/dist/errors.d.ts:74

For not-unique: the paths of the leaves whose values repeat another entry's (RFC 7950 §15.1 non-unique).


path ​

ts
readonly path: string;

Defined in: yang/dist/errors.d.ts:48

The data path of the node the problem is on, RFC 7951 style (/ietf-interfaces:interfaces/interface[name='eth0']/mtu), or / for the document as a whole. For a missing node, the path it would have.


position? ​

ts
readonly position?: SourceLocation;

Defined in: yang/dist/errors.d.ts:56

Where the problem is in the data text, when it was decoded with the positions option: the start of the node's XML element or JSON member, or of the parent's for a node that is missing. Absent for trees built in code, for already-parsed input, and for a problem with the document as a whole. (location is where a constraint is defined in a module.)


severity ​

ts
readonly severity: "error" | "warning";

Defined in: yang/dist/errors.d.ts:61

warning for a constraint the data may break: semantic constraints in <operational> (RFC 8342 §5.3). Everything else is an error.

Released under the MIT Licence.