mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:31:23 +00:00
refactor: centralize unhandled rejection setup
This commit is contained in:
7
src/infra/bonjour-errors.ts
Normal file
7
src/infra/bonjour-errors.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user