Skip to content
PACKAGES

errorPayload()

R-data-payload / D78: host-language failures that collide with ctx.terminal shorthand become diagnostics.

import { errorPayload } from "@graphrefly/ts/core";
function errorPayload(
reason: unknown,
fallback = "error without a valid payload",
): unknown
ParameterTypeDescription
reasonunknownreason value used by the helper.
fallbackunknownfallback value used by the helper.

The error payload result.

import { errorPayload } from "@graphrefly/ts/core";

packages/ts/src/protocol/messages.ts