phisys / exceptions-bundle
Symfony bundle for phisys/exceptions integration.
Installs: 210
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Type:symfony-bundle
Requires
- php: ^7.4|^8
- phisys/exceptions: ^1
- symfony/dependency-injection: ^4.4.1|^5.0.1
- symfony/http-kernel: ^4.4
Requires (Dev)
- phisys/coding-standard: dev-master
This package is auto-updated.
Last update: 2025-02-28 18:02:25 UTC
README
Symfony bundle for phisys/exceptions integration.
ApiExceptionListener
By default, replace Symfony standard exception response by a JsonResponse, using the api exception status code for the http code.
JsonResponse payload example
{ "message": "An error has occurred", "error_code": 40001123 }
You can implement your own ApiResponseLoader with a different json structure, or even with a different Response implementation,
just by defining it with the service ID "PhiSYS\ExceptionsBundle\Http\Service\ApiResponseLoader"
.