Skip to content

Commit

Permalink
webui: duplicated error text
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Aug 6, 2024
1 parent fef05f9 commit e949791
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion code/html/src/errors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ import { loadTemplate, mergeTemplate } from './template.mjs';
* @returns {string}
*/
export function formatError(error) {
return [error.name, error.message, error.stack].join("\n");
if (error.stack) {
return error.stack;
}

return [
error.name,
error.message,
"(no error stack)"
].join("\n");
}

/**
Expand Down

0 comments on commit e949791

Please sign in to comment.