errorPayload()
R-data-payload / D78: host-language failures that collide with ctx.terminal shorthand become diagnostics.
Import
Section titled “Import”import { errorPayload } from "@graphrefly/ts/core";Signature
Section titled “Signature”function errorPayload( reason: unknown, fallback = "error without a valid payload",): unknownParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
reason | unknown | reason value used by the helper. |
fallback | unknown | fallback value used by the helper. |
Returns
Section titled “Returns”The error payload result.
Example
Section titled “Example”import { errorPayload } from "@graphrefly/ts/core";Source
Section titled “Source”packages/ts/src/protocol/messages.ts