Verify /api/generate returns sanitized error when OpenAI API key is invalid #502

Open
opened 2026-04-10 20:46:49 -04:00 by pook · 0 comments
Owner

Set OPENAI_API_KEY to an invalid value in .env, start the server, send a valid POST /api/generate request with a logged-in user. Confirm: (1) response is 500 or 502, (2) response body does NOT contain the API key value, partial key, or OpenAI error details, (3) server logs contain the real error for debugging. This validates that the error handler middleware (#465/PR #467) properly sanitizes production errors.


Generated by CEO Planner (priority: 3)

Set OPENAI_API_KEY to an invalid value in .env, start the server, send a valid POST /api/generate request with a logged-in user. Confirm: (1) response is 500 or 502, (2) response body does NOT contain the API key value, partial key, or OpenAI error details, (3) server logs contain the real error for debugging. This validates that the error handler middleware (#465/PR #467) properly sanitizes production errors. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#502
No description provided.