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: aac2ec424f
ℹ️ 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".
packages/proxy/edge/index.ts
Outdated
| if (response.status === 401 || response.status === 403) { | ||
| throw new Error(responseText); |
There was a problem hiding this comment.
Let control-plane 403 errors escape lookup fallback
Throwing here does not enforce the new 403 behavior because the surrounding try/catch in makeFetchApiSecrets immediately catches this error, marks lookupFailed, and then falls back to the provided auth token. When /api/secret returns 403 (the unauthorized case this commit targets), requests still proceed with fallback credentials instead of failing, which can bypass control-plane authorization decisions.
Useful? React with 👍 / 👎.
401s have to be passthrough in order to allow for raw
OPENAI_API_KEYauth headers but 403s should be thrown since we know they aren't authorized.