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

fix: removing InternalCustomResponseExceptionHandling in ASP.NET core… #1007

Closed
wants to merge 1 commit into from

Conversation

MDanialSaleem
Copy link

fix: removing InternalCustomResponseExceptionHandling in ASP.NET core server that resulted in implementation details being leaked.

Issue #, if available: 886

Description of changes:
The default behavior of ASP.NET core when an unhandled exception is thrown in a controller is to respond with the type of exception in an HTTP header. This is done by the InternalCustomResponseExceptionHandling method. This leaks implementation details. Per this comment I have removed that behavior.

Prior to this, overriding this behavior required override the ProcessRequest method that called the InternalCustomResponseExceptionHandling method since the latter is private protected. This PR does not change this behavior. One still has to override ProcessRequest in order to change behavior on unhandled exceptions.

[x] I have run the tests and they pass.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

… server that resulted in implementation details being leaked.
@ashishdhingra
Copy link
Contributor

PR #899 looks similar and adds opt-in behavior. Should this PR be closed?

@normj
Copy link
Member

normj commented Feb 12, 2023

I ended merging the similar #899 PR because it allowed users that want the existing behavior to be able to opt in to that behavior. PR 899 was released as part of version 8.0.0 of Amazon.Lamnda.AspNetCoreServer. It was a major version bump due to the slight breaking change behavior.

@normj normj closed this Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants