-
Notifications
You must be signed in to change notification settings - Fork 693
Closed
Description
Hi, I'm testing Exception Handling
and stopped by a little problem belows.
I'm not sure this is a bug or NOT. But if not, I wish someone helps me! :D
Symfony\Component\HttpFoundation\Response::HTTP_* constant does not works.
from the manual ( http://symfony.com/doc/master/bundles/FOSRestBundle/4-exception-controller-support.html )
...
To map Exception classes to HTTP response status codes an exception map may be configured, where the keys match a fully qualified class name and the values are either an integer HTTP response status code or a string matching a class constant of the Symfony\Component\HttpFoundation\Response class:
...
This Configuration does works, well
fos_rest.exception.codes
'Symfony\Component\Security\Core\Exception\AccessDeniedException': 403
But, This configuration does not works
fos_rest.exception.codes
'Symfony\Component\Security\Core\Exception\AccessDeniedException': HTTP_FORBIDDEN
Metadata
Metadata
Assignees
Labels
No labels