NickCraver/StackExchange.Exceptional

Url to errors

radenkozec opened this issue · 5 comments

I am using .NET Core 2.1 version of StackExchange.Exceptional.
I don't know url and route to see errors page.
URL to errors is not mentioned in documentation.
I found on some old stackoverflow questions that URL is Exceptions.axd but not working?
Can you point me to the URL?

Maybe it's not very clear but this is mentioned in the docs at https://nickcraver.com/StackExchange.Exceptional/AspDotNetCore

Routes

For convenience, there is an easy to add route handler to render your errors. This way you can lock down the route using your current security models. The route iself is simple, in any controller (probably an admin or localhost controller):

public async Task Exceptions() => await ExceptionalMiddleware.HandleRequestAsync(HttpContext);

So in a Controller of your choice, add an Action that returns await ExceptionalMiddleware.HandleRequestAsync(HttpContext);.

There does seem to be an issue with the CSS and JS. I get a 200 for https://localhost:44357/logging/exceptions but a 404 for https://localhost:44357/logging/exceptions/css?v=... and https://localhost:44357/logging/exceptions/js?v=...

Personally I use https://github.com/opserver/Opserver to visualise errors across applications.

@NickCraver Thanks. It was not clear or easy to find that.

@radenkozec Where in the docs were you looking? It's it's unclear we should definitely fix that with a note and a link perhaps.

@NickCraver https://nickcraver.com/StackExchange.Exceptional/AspDotNetCore
I have read at but I did not understand it. I thought it is just for replace default route or something like that especially because it was in the end of documentation.
I suggest that it needs to be in the begging of documentation and with more detailed example of controller code.

Gotcha - to help I added links right after the screenshots on the main screen: https://nickcraver.com/StackExchange.Exceptional/ - if it's still an issue I welcome more doc improvements there.

After ASP.NET Core 2.2, the routing engine will be available in middleware and registering one automatically as a simple setting path will be possible...can't do much until then in terms on improving on the code side though, only docs for now.