mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 21:00:43 +00:00
* fix(deps): detect constant dynamic imports in ownership audit * feat(plugins): move bonjour discovery into bundled plugin * test(plugins): remove moved bonjour core tests * fix(plugins): harden bonjour disable and console restore * fix(plugins): split gateway discovery ids from services * fix(plugins): harden bonjour advertiser shutdown * fix(plugins): clean up bonjour split lint
12 lines
362 B
TypeScript
12 lines
362 B
TypeScript
export function formatBonjourError(err: unknown): string {
|
|
if (err instanceof Error) {
|
|
const trimmedMessage = err.message.trim();
|
|
const msg = trimmedMessage || err.name || String(err).trim();
|
|
if (err.name && err.name !== "Error") {
|
|
return msg === err.name ? err.name : `${err.name}: ${msg}`;
|
|
}
|
|
return msg;
|
|
}
|
|
return String(err);
|
|
}
|