Skip to content

Proposal: new error page #1776

@rstacruz

Description

@rstacruz

Hey, friends. Let's talk about Phoenix's error page. I think we can do a lot of improvement here.

image

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?

image

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.

image

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?

image

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions