Generate comprehensive error handling code for API endpoints.
Create a prompt that takes an API endpoint description and generates complete error handling code. Should cover: input validation, authentication errors, database errors, rate limiting, and proper HTTP status codes with helpful error messages.
Your prompt is run on this input, and both the result and your prompt are graded against the goal below. Put {input} in your prompt where the sample should go, or just write instructions and the sample is sent right after them.
POST /api/users endpoint that creates a new user
Goal: Complete error handling covering validation, auth, DB errors, rate limiting with proper status codes
Get personalized hints based on your current progress. Start with gentle hints and progress to more detailed ones.