Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ensure DefaultErrorAttributes adds JSON serialization safe errors #43330

Closed
wants to merge 1 commit into from

Conversation

YongGoose
Copy link
Contributor

resolved #42013

  • Added ErrorWrapper to enable DefaultErrorAttributes to handle errors related to MethodValidationResult.

Signed-off-by: yongjunhong <kevin0928@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 29, 2024
@YongGoose
Copy link
Contributor Author

@wilkinsona @philwebb

If there are any issues with my approach or implementation, I would appreciate your feedback 😁

@philwebb
Copy link
Member

philwebb commented Dec 3, 2024

@YongGoose I think from a cursory glance this is what we had in mind, but we won't be able to do a detailed review until we look at merging the PR. We can't do that until we branch for Spring Boot 3.5 which is still a few weeks away.

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 3, 2024
@philwebb philwebb added this to the 3.5.x milestone Dec 3, 2024
@YongGoose
Copy link
Contributor Author

@philwebb
Thank you for the detailed explanation!
I'll wait for the branching process for Spring Boot 3.5 and the subsequent review.

@philwebb philwebb self-assigned this Jan 13, 2025
@philwebb philwebb changed the title Add ErrorWrapper to populate errors for MethodValidationResult Ensure DefaultErrorAttributes adds JSON serialization safe errors Jan 14, 2025
philwebb pushed a commit that referenced this pull request Jan 14, 2025
Update `DefaultErrorAttributes` implementations so that errors
are wrapped for consistent JSON serialization.

Prior to this commit, only `ObjectError` implementations were
included in the 'errors' entry.

Signed-off-by: yongjunhong <kevin0928@naver.com>

See gh-43330
philwebb added a commit that referenced this pull request Jan 14, 2025
Polish code and extend wrapping to all error types.

See gh-43330
@philwebb philwebb closed this in e2a62d6 Jan 14, 2025
@philwebb philwebb modified the milestones: 3.5.x, 3.5.0-M1 Jan 14, 2025
@philwebb
Copy link
Member

Thanks very much @YongGoose!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DefaultErrorAttributes doesn't populate errors for MethodValidationResult
3 participants