-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception handling support for "problem details" rfc7807 #26507
Comments
We could use this issue as the basis for a broader rfc7808 "Problem Details for HTTP APIs". Spring Boot has an issue about this (see spring-projects/spring-boot#19525), but we're likely to need infrastructure support from Spring Web Frameworks. |
Great, thank you, @bclozel ! |
I can work on this if it's available. I am a first time contributor, do let me know if this is something a first timer can take a dig on. |
Hello @npathai I've tagged this issue with "status: pending-design-work". In this case, we know that Spring HATEOAS and 3rd party Spring Boot starters provide features in this space. We don't know how this would be support in Spring Framework yet. From turning business exceptions into problem details instances, providing an error handling infrastructure, helping to localize error messages and URLs to error pages, etc. Some of this could be in Spring Framework, other parts should belong in Spring Boot. We know that this feature requires significant changes and we'd like to tackle it in the Spring Framework 6.x timeline. We're happy to have community members like you willing to help. In general, you should try and look for "status: ideal-for-contribution" issues. Arguably, they're not really common in Spring Framework because many issues are really specific, but other Spring projects have more of those. Many community members start by contributing documentation improvements, fixing typos, or answering questions on StackOverflow. Thanks! |
@bclozel Sure, sounds reasonable. Thanks for the insight. I contribute in other projects but was starting to look into open issues in Spring. I will look into other Spring projects 👍 |
@dirweis there is only a single exception that is raised and resolved through the |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
@rstoyanchev What can I explain deeper hereby? What is not clear? I'm aware that only a Have an ice weekend, Dirk |
@dirweis when the issue was originally accepted, the intent was to support for RFC 7807. We now have an official umbrella issue #27052 and I'm looking at the specifics of your request. You seem to be asking for some variant of the The StackOverflow question you referenced on the other hand is about how to handle different exceptions types in the same way, not at the same time. In terms of the RFC 7807 |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
According to RFC-7807 (see https://tools.ietf.org/html/rfc7807) it would be useful to provide an
invalid-params
field in case of400 Bad Request
errors. This field is supposed to contain ALL violated parameters, no matter whichException
type is caught by theExceptionHandler
annotated methods.Since in case of multiple violations it is possible that
Exceptions
of different types occur (e.g.ConstraintViolationException
andMethodArgumentTypeMismatchException
from one request), thoseException
objects must be available in theExceptionHandler
.A solution would be a resolver for a
List
ofExceptions
.The text was updated successfully, but these errors were encountered: