Skip to content

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

Description

@wilkinsona

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions