Common utilities for error handling within Backstage with structured error classes and serialization functions
63
Create a utility that serializes thrown values into plain objects while allowing callers to opt in to sharing stack traces.
@generates
export type SerializedAppError = {
name: string;
message: string;
stack?: string;
cause?: SerializedAppError;
};
/**
* Converts any thrown value into a serializable structure.
* When includeStack is true, stack traces for the error and any nested causes are attached.
*/
export function serializeAppError(
error: unknown,
options?: { includeStack?: boolean }
): SerializedAppError;Provides structured error utilities and optional stack trace serialization.
Install with Tessl CLI
npx tessl i tessl/npm-backstage--errorsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10