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

Customisable response when EnforceHeader is set #106

Open
colin-sim opened this issue Oct 14, 2021 · 1 comment
Open

Customisable response when EnforceHeader is set #106

colin-sim opened this issue Oct 14, 2021 · 1 comment

Comments

@colin-sim
Copy link

When EnforceHeader is set to true a 400 is returned with a plaintext explanation, when a correlation ID is not provided.

Could this be changed so that ProblemDetails is returned instead to be consistent with default ApiController behaviour. Alternatively, provide an option to throw an exception instead, that way, anyone implementing a catch-all handler can wrap the error in a ProblemDetails response.

@dmytrohridin
Copy link

it will be useful when it will be possible to set up some response factory on EnforceHeader executed. I believe it's also can be done with full backward compatibility
cc @stevejgordon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants