We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80ebad6 commit e74876eCopy full SHA for e74876e
worker/src/lib/ai-gateway/AttemptExecutor.ts
@@ -140,9 +140,16 @@ export class AttemptExecutor {
140
const response = await forwarder(endpoint.baseUrl, escrowInfo);
141
142
if (!response.ok) {
143
+ let text: string;
144
+ try {
145
+ text = await response.text();
146
+ } catch (error) {
147
+ text = "Failed to read response body";
148
+ }
149
+
150
return err({
151
type: "request_failed",
- message: `Request failed with status ${response.status}`,
152
+ message: `Request failed with status ${response.status}: ${text}`,
153
statusCode: response.status,
154
});
155
}
0 commit comments