Skip to content

Symfony bundle for dosfarma/exceptions integration.

Notifications You must be signed in to change notification settings

DosFarma/exceptions-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DosFarma Exceptions Bundle

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".

About

Symfony bundle for dosfarma/exceptions integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published