spring-projects / spring-projects/spring-boot

Render global errors as Problem Details

Open
#43,850 15 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.