dosfarma/exceptions-bundle

This package is abandoned and no longer maintained. The author suggests using the phisys/exceptions-bundle package instead.

Symfony bundle for dosfarma/exceptions integration.

Installs: 326

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 1

Open Issues: 0

Type:symfony-bundle

dev-master 2020-10-28 08:58 UTC

This package is auto-updated.

Last update: 2021-04-28 09:23:46 UTC


README

Symfony bundle for dosfarma/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 "DosFarma\ExceptionsBundle\Http\Service\ApiResponseLoader".