Skip to content

Logged exceptions not showing up in the exception tab #24877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
greg0ire opened this issue Nov 9, 2017 · 11 comments
Closed

Logged exceptions not showing up in the exception tab #24877

greg0ire opened this issue Nov 9, 2017 · 11 comments

Comments

@greg0ire
Copy link
Contributor

greg0ire commented Nov 9, 2017

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
@greg0ire
Copy link
Contributor Author

greg0ire commented Nov 9, 2017

Not sure if feature request or bug BTW, because I think I have seen that work before.

@stof
Copy link
Member

stof commented Nov 9, 2017

We should indeed preserve depth for the previous exception here IMO (as we do for the trace).

Populating the Exception panel based on log messages containing an exception won't work. the Exception panel can only contain one exception (with its chain). It is meant to display the uncatched exception reaching the kernel.exception event and the error controller.

@greg0ire
Copy link
Contributor Author

greg0ire commented Nov 9, 2017

Not sure if feature request or bug BTW, because I think I have seen that work before.

Ok so I'm probably confused then :P

@SenseException
Copy link
Contributor

SenseException commented Nov 9, 2017

@stof So the options are making room for multiple exceptions in the Exception panel or a create new panel?

@stof
Copy link
Member

stof commented Nov 9, 2017

@SenseException why creating a new panel ? the option is improving the dumping of the logged exception in the log panel, so that the previous exception can get expanded too, not only the trace.

Making room for multiple exceptions in the exception panel does not make any sense: there is no way to have multiple exceptions in it without re-purposing the panel entirely.

@SenseException
Copy link
Contributor

@stof I wasn't sure to understand where you wanted to go with your last comment and I understood those two options I previously mentioned.

@ogizanagi
Copy link
Contributor

ogizanagi commented Nov 10, 2017

#23465 which is the root of the issue might cut things a bit too much indeed. We're loosing some degree of information in different panels since. :/

@Simperfit
Copy link
Contributor

@ogizanagi can we do something about this ?

@fabpot fabpot modified the milestones: 3.4, 4.4 Oct 28, 2020
@carsonbot
Copy link

Hey, thanks for your report!
There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?

@carsonbot
Copy link

Friendly ping? Should this still be open? I will close if I don't hear anything.

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants