(feat) add request error details (#31)

Signed-off-by: Adam Montgomery <montgomery.adam@gmail.com>
This commit is contained in:
Adam Montgomery
2025-04-16 14:23:42 -04:00
committed by GitHub
parent 501e96f3d5
commit 94889dd76e

View File

@@ -636,9 +636,16 @@ export class AgentLoop {
}>
)?.requestId;
const errorDetails = [
`Status: ${status || "unknown"}`,
`Code: ${errCtx.code || "unknown"}`,
`Type: ${errCtx.type || "unknown"}`,
`Message: ${errCtx.message || "unknown"}`,
].join(", ");
return `⚠️ OpenAI rejected the request${
reqId ? ` (request ID: ${reqId})` : ""
}. Please verify your settings and try again.`;
}. Error details: ${errorDetails}. Please verify your settings and try again.`;
})(),
},
],