mirror of
https://github.com/n8n-io/n8n.git
synced 2026-12-04 08:42:01 +00:00
Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
5 lines
207 B
TypeScript
5 lines
207 B
TypeScript
/** Returns the message of `error`, or its string form if it is not an `Error`. */
|
|
export function getErrorMessage(error: unknown): string {
|
|
return error instanceof Error ? error.message : String(error);
|
|
}
|