GlobalExceptionHandlerDotNet icon indicating copy to clipboard operation
GlobalExceptionHandlerDotNet copied to clipboard

Unhandled exception log

Open lsgroi opened this issue 6 years ago • 1 comments

As far as I understand, the library is built on top of ExceptionHandlerMiddleware by setting its exception handler.

By default the exception is logged as "unhandled exception" after which is handled by the library via ExceptionHandlerConfiguration.

This is causing a message "An unhandled exception has occurred: ..." sent to the logger. What would you suggest to avoid that behaviour?

lsgroi avatar Apr 09 '18 13:04 lsgroi

Hi @JosephWoodward, Could you please suggest any workaround/fix for Unhandled exception logs logged by ExceptionHandlerMiddleware.

For ex: 2019-01-28 14:09:10.3817|ERROR|Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware||An unhandled exception has occurred while executing the request. A network-related or instance-specific error occurred while establishing a connection to SQL Server.....

This is also logged when OnError logging.

dharanish avatar Jan 28 '19 13:01 dharanish