refactor: centralize unhandled rejection setup

This commit is contained in:
Peter Steinberger committed 2026-01-07 20:59:49 +00:00
1 parent fd3babc626
commit 9bd439892f
7 files changed
+43 -45

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
export function formatBonjourError(err: unknown): string {
if (err instanceof Error) {
const msg = err.message || String(err);
return err.name && err.name !== "Error" ? `${err.name}: ${msg}` : msg;
}
return String(err);
}