Class: HandlerError
Represents a HandlerError.
Implements
Constructors
constructor
• new HandlerError(properties?): HandlerError
Constructs a new HandlerError.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IHandlerError | Properties to set |
Returns
Properties
errorType
• errorType: string
See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors.
Implementation of
failure
• Optional failure: null | IFailure
HandlerError failure.
Implementation of
retryBehavior
• retryBehavior: NexusHandlerErrorRetryBehavior
Retry behavior, defaults to the retry behavior of the error type as defined in the spec.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this HandlerError to JSON.
Returns
Object
JSON object
create
▸ create(properties?): HandlerError
Creates a new HandlerError instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | IHandlerError | Properties to set |
Returns
HandlerError instance
decode
▸ decode(reader, length?): HandlerError
Decodes a HandlerError message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
HandlerError
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing