Back to prompts
Write an API error playbook for clients from the following inputs: API name: [API NAME] Auth model: [API KEY / OAUTH / OTHER] Error formats used: [HTTP STATUS + JSON BODY SHAPE] Top error codes to document: [LIST CODES] Retry policy constraints: [IDEMPOTENCY, RATE LIMITS] Audience: [INTEGRATORS / INTERNAL TEAMS / BOTH] Support contact path: [DOCS / TICKET / EMAIL] Known confusing edge cases: [EDGE CASES] Requirements: 1. Document each error with meaning, common causes, client action, and whether retry is safe. 2. Provide example request/response snippets using placeholders, not real secrets. 3. Include a decision tree for auth failures vs validation vs rate limits vs server faults. 4. Specify backoff guidance consistent with the stated retry constraints. 5. Add a logging checklist so clients capture correlation IDs without leaking sensitive data. 6. Keep tone precise for developers. Avoid marketing language. 7. Call out breaking vs non-breaking error contract changes if versioning is mentioned. 8. End with a short FAQ covering the known confusing edge cases.
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.
Tip
Fill every placeholder before you run the prompt. Keep one clear goal per run, then refine with a follow-up if needed.
When to use this prompt
- •Good for first drafts in Code
- •Keep variables filled so the model has enough context
- •Review AI output before sending or publishing