Skip to content

Improve the exception page when there is no message #23135

@javiereguiluz

Description

@javiereguiluz
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 3.3

It's uncommon, but sometimes exceptions don't contain any error message. For example, with this route definition:

my_route:
    path: '...'
    defaults: { _controller: FrameworkBundle:Redirect:redirect, route: '', permanent: true }

When the route is empty, the RedirectController throws this exception:

        if ('' == $route) {
            throw new HttpException($permanent ? 410 : 404);
        }

Which looks like this in the browser:

before-exception


What do you think if we hide the message section when it's empty? Something like this:

after-exception

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions