visitormanagement icon indicating copy to clipboard operation
visitormanagement copied to clipboard

ExceptionHandlingMiddleware seems to not catch a global exception

Open alexvazquez opened this issue 2 years ago • 3 comments

Congratulations for the great architecture.

I tried to see if ExceptionHandlingMiddleware was working, so I placed a breakpoint after login here:

image

And then I set the request object to be null to generate an exception as in the following image.

image

I had a breakpoint in the ExceptionHandingMiddleware class here:

image

To see if the line was hit but it never gets into that catch statement.

Any clue?

alexvazquez avatar Sep 13 '22 22:09 alexvazquez

ExceptionHandlingMiddleware just catches MediaR handle.

neozhu avatar Sep 13 '22 23:09 neozhu

ExceptionHandlingMiddleware just catches MediaR handle.

Is there a way to have a global exception handler for everything?

I was reading there is Error Boundaries in .NET6, is that implemented in this project for handing exceptions? Appreciate it

alexvazquez avatar Sep 13 '22 23:09 alexvazquez

Error Boundaries is working for the page level. as I know

neozhu avatar Sep 14 '22 05:09 neozhu