This node defines an error that can be returned by a program.
Attribute | Type | Description |
---|---|---|
kind |
"errorNode" |
The node discriminator. |
name |
CamelCaseString |
The name of the error. |
code |
number |
The error code. |
message |
string |
A human-friendly message describing the error. |
docs |
string[] |
Additional Markdown documentation for the error. |
This node has no children.
Helper function that creates a ErrorNode
object from an input object.
const node = errorNode({
name: 'invalidAmountArgument',
code: 1,
message: 'The amount argument is invalid.',
});