-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Hey, friends. Let's talk about Phoenix's error page. I think we can do a lot of improvement here.
Situation
This design has served Phoenix and better_errors well for a while, but it can use some improvement.
- The exception messages are limited to one line (tho more info can be shown on hover). This is kind of cumbersome, considering many Elixir errors can span multiple lines.
- The request info/headers/params/session area (below the source) made sense for better errors, because better_errors allowed you to inspect what's in each stack frame. Not quite so in Phoenix. It feels weird that it's huge and it looks like it changes when you click on a stack frame on the left.
- It feels needlessly verbose. Most times I'm only concerned about what error happened, and the line that triggered it. These need to be presented more prominently.
Proposal
How about something more like this?
Gone is the weird frame-like scrolling; instead, it scrolls down naturally like a page would. (except for the stack trace... you should be able to scroll it down on its own iframe-like container.)
You'll see that above the fold, most the relevant things are what immediately draws your attention.
By putting all the "more info" stuff at the bottom, we get more space to do more interesting things. How links to search Google for the error? Or maybe link to the relevant hexdocs?
This is a rough draft of course, but if you like where this is going I'd be happy to polish it up and implement it.
By the way
I'm the author of the original better_errors error page, which I believe Phoenix's is based off of :)



