mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:41:25 +00:00
fix: tame invalid config logging
This commit is contained in:
@@ -20,3 +20,13 @@ export function formatErrorMessage(err: unknown): string {
|
||||
return Object.prototype.toString.call(err);
|
||||
}
|
||||
}
|
||||
|
||||
export function formatUncaughtError(err: unknown): string {
|
||||
if (extractErrorCode(err) === "INVALID_CONFIG") {
|
||||
return formatErrorMessage(err);
|
||||
}
|
||||
if (err instanceof Error) {
|
||||
return err.stack ?? err.message ?? err.name;
|
||||
}
|
||||
return formatErrorMessage(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user