(feat) add request error details (#31)
Signed-off-by: Adam Montgomery <montgomery.adam@gmail.com>
This commit is contained in:
@@ -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.`;
|
||||
})(),
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user