Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d548a3b61
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (response.status === 400 || response.status === 403) { | ||
| throw new Error( | ||
| `Failed to lookup api key: ${response.status}: ${responseText}`, |
There was a problem hiding this comment.
Preserve 403 status when rethrowing lookup failures
This branch now throws a plain Error for /api/secret 403 responses, but EdgeProxyV1 catches all thrown errors and always returns HTTP 400 (packages/proxy/edge/index.ts, around lines 407-410), so the new 403 path is still not actually propagated to clients. In requests with invalid/forbidden Braintrust credentials, callers that rely on receiving 403 will instead see 400, which misclassifies auth failures and can break client-side handling.
Useful? React with 👍 / 👎.
No description provided.