spring-projects / spring-projects/spring-boot
Render global errors as Problem Details
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
Spring Boot handles errors globally as JSON responses or HTML pages. This is powered by ErrorController and ErrorAttributes.
Spring Framework added support for Problem Details and Spring Boot auto-configures this as of #32634.
This issue is about rendering global errors in the problem details format consistently, as well as providing a path forward to making this the default in the future. This means that ErrorAttributes would need to produce a ProblemDetail or ErrorResponse instead of a Map. Also, we would probably need to revisit the backing infrastructure to better align with Framework. There are upcoming changes in Framework that could help us to improve the support and make it more lightweight, see https://github.com/spring-projects/spring-framework/issues/34272.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Spring Boot's ErrorController and ErrorAttributes, then review the Problem Details support referenced from Spring Framework and the changes in #32634. The issue is complete when global errors are rendered consistently as Problem Details and a path toward making that behavior the default is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100