UNPKG

@bitte-ai/agent-sdk

Version:

Agent SDK for Bitte Protocol

14 lines (13 loc) 334 B
export function errorString(error) { // intentional == to check for null or undefined if (error == null) { return `unknown error: ${error}`; } if (typeof error === "string") { return error; } if (error instanceof Error) { return error.message; } return JSON.stringify(error); }