fix: replace favicon with svg icon#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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
| export async function POST(request: Request) { | ||
| await requireAdmin(); | ||
| const body = await request.json().catch(() => null); | ||
| const parsed = createSchema.safeParse(body); |
There was a problem hiding this comment.
[P1] Return auth failures instead of generic server errors
The POST handler calls requireAdmin() and lets any thrown error bubble up. Because requireAdmin throws a plain Error with a status property rather than a NextResponse, an unauthenticated or non‑admin request will result in an unhandled error and the route returns a 500 instead of the intended 401/403 JSON response. This both misreports the error to clients and leaks stack traces in development. Catch the error and return a NextResponse with the appropriate status (and apply the same handling to the other admin‑only API routes).
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68d8f1e3c290832aa3df8f56baffc2df