---
title: "Keep error types stable · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/errors/stable-error-types
updated: 2026-10-20
licence: "All rights reserved"
---

# Keep error types stable

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Errors](https://agentwranglers.se/playbook/api-design/errors)
- Rule: Treat each error `type` as part of the contract. Clients branch on it, so never rename or reuse one.
- How: List every problem type in the OpenAPI file and on a public page at its URI. Change the wording of `detail` freely, but never the `type`. Clients branch on `type`, never on `title` or `detail` text.
- Check: A test lists the problem types the code can return. Each one appears in the contract and its URI answers 200.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/errors/stable-error-types`.

- Previous: [Send errors as problem details](https://agentwranglers.se/playbook/api-design/errors/problem-details)
- Next: [Name every field that failed](https://agentwranglers.se/playbook/api-design/errors/validation-errors)
- [Errors](https://agentwranglers.se/playbook/api-design/errors)
