Skip to content

Exception render does not expose previous exceptions #57366

@DarkGhostHunter

Description

@DarkGhostHunter

Laravel Version

12.x

PHP Version

8.4

Database Driver & Version

N/A

Description

Some exceptions rendered by libraries or the application itself may include the previous exception that triggered it.

When the exception is rendered by Laravel as a response, there is no way to know the previous exception or track the previous exceptions from there. This turns a simple one minute debug line into an one hour investigation to know what triggers it.

My suggestion is to add an accordion with all the "previous" exceptions, much like the Exception Trace accordion, if it exists. It should travel until there $exception->getPrevious() returns empty.

Steps To Reproduce

  1. Throw an Exception with a previous Throwable exception.
  2. Watch the rendered exception response not showing the previous exception.

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