-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Custom Exception Filters are unable to update the result, returning a 200 Status Code and an empty page #1820
Comments
We had the same issue and found a solution to this problem until it is fixed. Add the following line at the end of the code:
I don't know if this is a good idea but it seems to work and give the right result |
/cc @Eilon - something funky is going on with 1.1.0 and exception filters - we made changes in this area for 1.1.0 so we should have someone investigate this as a potential patch candidate. |
This issue was moved to aspnet/Mvc#5901 |
* More FrameConnection refactoring - This change reverts the change to complete the writer with an exception on abort because of the number of first chance exceptions that get thrown. - This change also moves connection logging into FrameConnection instead of being split between the ConnectionHandler and FrameConnection. - Fixed issues with LibuvOutputConsumerTests that leak WriteReq since cancelled writes no longer end the connection.
I have created a custom Exception filter which looks like this...
I changed it to this, hoping for it to either blow up or loop itself, but the end result was the same...
This is being used within an action like this...
I have stepped through the code to validate that the OnException method of the filter is being run (it runs fine) and to check that code execution is not returning to the Action (it doesn't).
If I remove the exception handled line then the filter executes twice then the expected result (a 404) is returned...
The text was updated successfully, but these errors were encountered: