diff --git a/frontend/src/lib/components/toast.ts b/frontend/src/lib/components/toast.ts index f1f1a84f19..7290df87e5 100644 --- a/frontend/src/lib/components/toast.ts +++ b/frontend/src/lib/components/toast.ts @@ -2,7 +2,11 @@ const pathRegex = /\b(u|f)\/[^\/\s]+\/[^\/\s]+\b/g export function processMessage(message: string | undefined): string { - return (message ?? 'Error without message').replaceAll(pathRegex, (path) => { + return ( + typeof message == 'string' + ? message ?? 'Error without message' + : JSON.stringify(message, null, 2) + ).replaceAll(pathRegex, (path) => { return `${path}` }) }