mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-21 13:00:36 +00:00
parent
400f9a214e
commit
99abb9d42e
171 changed files with 7260 additions and 7342 deletions
|
|
@ -2,7 +2,11 @@ import { logger } from "../logging.js";
|
|||
|
||||
export function resolveErrorMessage(error: unknown): string {
|
||||
if (error instanceof Error) {
|
||||
return error.message;
|
||||
let msg = error.message;
|
||||
if (error.cause) {
|
||||
msg += ` [cause: ${resolveErrorMessage(error.cause)}]`;
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
return String(error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue