zoltanlaca/eh-symfony

Handling errors

Installs: 622

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

v1.0.4 2023-11-10 08:34 UTC

This package is auto-updated.

Last update: 2024-10-31 00:38:26 UTC


README

Setup

Add Environment Variables

  • EH_ERROR_HANDLER_URL - URL to the error handler. Eg: https://localhost/error/handler
  • EH_ERROR_HANDLER_API_AUTH - Key to access the error handler API. Eg: 1234567890

Symfony

Add ExceptionListener

Into config/services.yaml add the following:

services:
  Zoltanlaca\EhSymfony\EventListener\ExceptionListener:
    tags: [ kernel.event_listener ]

Skip exceptions

  • copy Zoltanlaca\EhSymfony\EventListener\ExceptionListener
  • fill skipExceptions array with your exceptions
  • replace ExceptionListener in config/services.yaml with your ExceptionListener