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

Make it easier for the error controller and the error attributes to be sure that they agree on the status of the response #20504

Open
wilkinsona opened this issue Mar 11, 2020 · 4 comments
Labels
status: blocked An issue that's blocked on an external project change theme: web-error-handling type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

wilkinsona commented Mar 11, 2020

See #20412 for background.

As things stand, it's possible for the error controller to set one status on the response while the error attributes implementation includes another in an entry in the model. Ideally, the API would guide things towards an arrangement that would minimise the possibility of this happening. That could be done by retrieving the value that's keyed by status from the ErrorAttributes or, perhaps, via a new method on ErrorAttributes that passes in the status that the error controller is going to set on the response. The former probably does a better job of minimising the chance of an inconsistency while the latter avoids requiring the response status to have the key status.

@wilkinsona wilkinsona added this to the 2.x milestone Mar 11, 2020
@wilkinsona wilkinsona added type: enhancement A general enhancement for: team-attention An issue we'd like other members of the team to review labels Mar 11, 2020
@wilkinsona
Copy link
Member Author

Assigned to 2.x for now. Flagging for team attention to see if we want to try and squeeze this into 2.3.

@wilkinsona
Copy link
Member Author

WebFlux currently uses the status taken from the error attributes to set the status on the response.

@wilkinsona wilkinsona removed the for: team-attention An issue we'd like other members of the team to review label Mar 12, 2020
@bclozel bclozel modified the milestones: 2.x, 3.x Jun 2, 2021
@scottfrederick scottfrederick added the status: blocked An issue that's blocked on an external project change label Nov 1, 2021
@DiegoPCanellas
Copy link

Hi, everyone! My team would like to tackle this one. is it ok?

@wilkinsona
Copy link
Member Author

Thanks for the offer, @DiegoPCanellas, but as you can see from the labels this issue is currently blocked as we don't know how to deal with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked An issue that's blocked on an external project change theme: web-error-handling type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants