Skip to content

Logged exceptions not showing up in the exception tab #24877

@greg0ire

Description

@greg0ire
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.3.10

I'm having poor DX with an exception logged here:

if (null !== $this->logger) {
$this->logger->info('Guard authentication failed.', array('exception' => $e, 'authenticator' => get_class($guardAuthenticator)));
}

All I get in the profile is a log that looks like this:

[▼
  "exception" => InvalidTokenException {#651 ▼
    -token: null
    #message: "Invalid JWT Token"
    #code: 0
    #file: "/var/www/html/vendor/lexik/jwt-authentication-bundle/Security/Guard/JWTTokenAuthenticator.php"
    #line: 119
    -previous: JWTDecodeFailureException {#671 …}
    trace: {▶}
  }
  "authenticator" => "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator"
]

I debugged a bit further and all the interesting part is buried in previous, which I can't access here.

Potential solutions:

  • showing previous exceptions in the logs tab
  • sending logged exceptions to the exceptions data collector

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions