Make it easier for the error controller and the error attributes to be sure that they agree on the status of the response #20504
Labels
status: blocked
An issue that's blocked on an external project change
theme: web-error-handling
type: enhancement
A general enhancement
Milestone
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.
The text was updated successfully, but these errors were encountered: