refactor: centralize unhandled rejection setup
This commit is contained in:
1 parent
fd3babc626
commit
9bd439892f
7 files changed
+43
-45
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user