Make exception information more user friendly
See original GitHub issueLooks like we are receiving more details on the client-side, but I would like to make this a little more user-friendly. Maybe we could get inspired on the old Windows error dialog boxes:
And have something like:
Error title
Error Message ...
Error details in a collapsable section (closed by default)?
In order to accomplish this, we might need to send more specific error details from the backend. In the past, I have accomplished something similar by distilling some of this info into specific response HTTP headers.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
User-Friendly Exception Handling - Coding Horror
I just posted a new article on Code Project, User Friendly Exception Handling. This is a set of classes that deal with unhandled...
Read more >Wrap exceptions in a user friendly message - Stack Overflow
The exception is logged and a more user friendly message is shown. The thing is that this works great when the debugger is...
Read more >User Friendly Exception Handling - CodeProject
A flexible framework for user-friendly .NET exception handling, and automatically notifying developers of problems before users do.
Read more >Best Practices for exceptions - .NET - Microsoft Learn
Learn best practices for exceptions, such as using try/catch/finally, handling common conditions without exceptions, and using predefined .
Read more >9 Best Practices to Handle Java Exceptions - Stackify
Handling Java exceptions isn't easy, especially for beginners. Read this post to understand exceptions and best practices for using them.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @karlaspuldaro - I hope to get some time to look into things on the back end tomorrow. I think we could probably define a mixin class that the back-end handlers can derive from that deals with exception formatting.
Three obvious fields are things like ‘title’, ‘message’ and ‘details’. I’m not sure about ‘error code’ since the handlers don’t necessarily have the context of what happened and trap general exception instances, but I’ll look into the viability of that. If an error code thing is ‘where we want to go with this’ then that usually implies a “registry” of codes, and I’d prefer we not go there outside of the general HTTP error codes (of which only a few are applicable).
At any rate, my plan would be to provide you with a branch on my fork that you can use to develop a front-end solution.
Here’s what the most updated version looks like Details collapsed by default: In case we don’t receive a traceback, we won’t see the “Error details:” line/button
Details expanded with auto scroll: