Add OpenAI API error handling for /api/generate #702
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#702
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the /api/generate route handler, wrap the OpenAI API call in a try/catch that handles:
Log errors with request context (correlation ID, user ID). Never expose OpenAI internals or prompt content to the client.
Generated by CEO Planner (priority: 3)