Skip to content
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

Have the ErrorResponse.Builder take in a custom ProblemDetail instance #30568

Closed
mzeijen opened this issue May 31, 2023 · 2 comments
Closed

Have the ErrorResponse.Builder take in a custom ProblemDetail instance #30568

mzeijen opened this issue May 31, 2023 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@mzeijen
Copy link

mzeijen commented May 31, 2023

As a user I would like to be able to create an ErrorResponse instance with a custom ProblemDetail instance, while using the default ErrorResponse.Builder via the ErrorResponse.builder and/or ErrorResponse.create methods. This makes it easier for me to provide a custom ProblemDetail class while still being able to use the builder facilities.

Currently there is no way to provide my own ProblemDetail instance to the builder, either via a method directly on ErrorResponse.Builder instance or via the ErrorResponse.create or ErrorResponse.builder methods (which is probably the preferred way).

Note: I have discussed this feature request with @rstoyanchev at Spring I/O 2023

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 31, 2023
@rstoyanchev rstoyanchev self-assigned this Jun 14, 2023
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 14, 2023
@rstoyanchev rstoyanchev added this to the 6.1.0-M1 milestone Jun 14, 2023
@rstoyanchev
Copy link
Contributor

Thanks for raising this, @mzeijen. I've added dcba947 in time for 6.1 M1 with plenty of time to refine further if needed.

@mzeijen
Copy link
Author

mzeijen commented Jun 19, 2023

Thanks for addressing this so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants