API Design · Senior · Question 62 of 75
How should breaking changes to error formats be treated?
- ✓Correct answer: As breaking API changes: clients parse errors to decide what to show or retry, so new formats need versioning or opt-in
- 2Only status codes matter
- 3Error formats can change anytime
Explanation
Adopting RFC 9457 in an existing API is best done as an opt-in (e.g. via Accept: application/problem+json) or a new version.