@threadplane/coreFunctionv0.3.7

projectErrorDiagnostic

Describes any thrown value as frozen plain data for a snapshot's errorDiagnostic. Reads name, message, stack, code, status and cause where they exist, copies other plain fields into data, and replaces functions, class instances and cycles with short text. Never throws for a value it can read.

import { projectErrorDiagnostic } from '@threadplane/core';

Declaration · overload 1

export declare function projectErrorDiagnostic(cause: unknown): AgentErrorDiagnostic;

Parameters

cause · required
unknown

Returns

AgentErrorDiagnostic