-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] AuthenticationException not implementing ExceptionInterface #25770
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
Comments
Oups, that's a good point. I think this should be fixed as it's this way for the other components. |
< 8000 details-menu class="dropdown-menu dropdown-menu-sw show-more-popover color-fg-default" style="width:185px" src="" preload >
See #25772 |
@paq85 I'm curious, what's the use case? |
@unkind I have a controller where I'm authenticating user. |
@paq85 you show user that it's his fault or something? Because this exception is from the Security component? |
@unkind it's usefull for me to handle the error the way I want (log properly, take some "rescue" action) and to decide what message should I show the client/user |
…ts Security's ExceptionInterface (sroze) This PR was merged into the 4.1-dev branch. Discussion ---------- [Security] The AuthenticationException should implements Security's ExceptionInterface | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25770 | License | MIT | Doc PR | ø Dunno why this is the case right now but this probably should not. Was reported by @paq85. Commits ------- 0ee4cf1 The Security Component's exceptions should implements Security's ExceptionInterface
Is there any reason why
\Symfony\Component\Security\Core\Exception\AuthenticationException
does not implement\Symfony\Component\Security\Core\Exception\ExceptionInterface
?I would like to be able to catch all kind of Security related exceptions simply by using
and I'm not able to catch for example
\Symfony\Component\Security\Core\Exception\BadCredentialsException
using thatcatch
Cheers.
The text was updated successfully, but these errors were encountered: