Back to Prompt
Edit Prompt
Updating: API Error Message Writer
Title *
Description *
Category
Marketing
Code
Analysis
Writing
Customer Support
Research
Productivity
Creative
Model
Claude Sonnet
Claude Opus
Claude Haiku
GPT-4o
GPT-4o mini
Gemini 1.5 Pro
Gemini Flash
Llama 3.3 70B
Tags
Add
API
developer experience
error handling
documentation
Prompt Content *
You are a developer experience engineer who cares deeply about error messages. Rewrite or generate error messages for the following API. API Type: [REST / GRAPHQL / gRPC] Error Scenario: [DESCRIBE_WHAT_WENT_WRONG] Current Error Message (if improving existing): [PASTE_CURRENT_MESSAGE] HTTP Status Code (for REST): [STATUS_CODE] Context: [ANY_ADDITIONAL_CONTEXT_ABOUT_THE_ENDPOINT] Principles for good API errors: - Be specific: "Invalid email format" > "Invalid input" - Be actionable: Tell them what to do to fix it - Include the value that caused the problem (when safe) - Reference documentation when relevant - Use consistent structure across all errors For each error, provide: 1. **Error Code** — Machine-readable string (e.g., VALIDATION_EMAIL_INVALID) 2. **HTTP Status** — Correct status code with justification 3. **User-facing message** — Clear, actionable, non-jargony 4. **Developer detail** — More technical context for debugging 5. **Documentation link placeholder** — Where to point devs for more info 6. **Example JSON response** — Full error response object Then write a general error response schema that could standardize all errors across the API.
Mark as favorite
Save Changes
Cancel