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

Pass HttpContext to Map() and MapStatusCode() as optional parameters #46

Closed
ts46235 opened this issue Feb 5, 2019 · 2 comments
Closed

Comments

@ts46235
Copy link

ts46235 commented Feb 5, 2019

There are things in the request that I"d like to base the exception on so it would be handy if that was passed in whenever an exception should be created. One thing is the RequestServices to get a hold of scoped dependencies since we have no way to do that right now.

The parameter could be nullable/optional to not break backwards compatibility.

Thanks for your contribution

@ngRevan
Copy link

ngRevan commented Feb 8, 2019

It would also make sense to pass the HttpContext to OnBeforeWriteDetails.

I just saw, an alternative would be to use IConfigureOptions as in the example.

@khellang
Copy link
Owner

khellang commented Feb 8, 2019

Good points both! I'm thinking I'd just do a breaking change and bump the major version for this 👌

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

3 participants