Server Exceptions are not shown in Application Insights
Closed this issue · 1 comments
Describe the bug
Any server exceptions thrown by the service are not visible in Application insights if the RestApiOptionsErrorHandlingExceptionFilter
is set to enabled
To Reproduce
Steps to reproduce the behavior:
- Setup a service with:
- Connected Application Insight
RestApiOptionsErrorHandlingExceptionFilter
setup and enabled
- Throw an intentional exception that will cause a 500 internal server
- See that the exception is not shown in the Application Insight
Expected behavior
Exception are still shown in the Application insight.
Workaround
Simply disabling the filter resolves the issue.
Additional context
This error handling exception filter is enabled by default and is an addon to ATC which might not be something users want to have by default. Consider disabling this feature by default.
I would also argue that this exception handling might not be something ATC should handle, but is something each project needs to handle on their own.
I know how to fix it but with the new(ish) repository I don't know how to test it