Guides
Tutorials
This error listener extends the Symfony one in order to add
the _api_operation attribute when the request is duplicated.
It will later be used to retrieve the exceptionToStatus from the operation (ExceptionAction).
class ApiPlatform\Symfony\EventListener\ErrorListener extends Symfony\Component\HttpKernel\EventListener\ErrorListener implements Symfony\Component\EventDispatcher\EventSubscriberInterface
{
protected duplicateRequest(Throwable $exception, Symfony\Component\HttpFoundation\Request $request): Symfony\Component\HttpFoundation\Request
public __construct(null|object|array|string $controller, null|Psr\Log\LoggerInterface $logger, bool $debug, array<string, array> $exceptionsMapping)
public logKernelException(Symfony\Component\HttpKernel\Event\ExceptionEvent $event)
public onKernelException(Symfony\Component\HttpKernel\Event\ExceptionEvent $event)
public removeCspHeader(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
public onControllerArguments(Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent $event)
public getSubscribedEvents(): array
protected logException(Throwable $exception, string $message, null|string $logLevel): null
}class ApiPlatform\Symfony\EventListener\ErrorListener extends Symfony\Component\HttpKernel\EventListener\ErrorListener implements Symfony\Component\EventDispatcher\EventSubscriberInterface
{
protected duplicateRequest(Throwable $exception, Symfony\Component\HttpFoundation\Request $request): Symfony\Component\HttpFoundation\Request
public __construct(null|object|array|string $controller, null|Psr\Log\LoggerInterface $logger, bool $debug, array<string, array> $exceptionsMapping)
public logKernelException(Symfony\Component\HttpKernel\Event\ExceptionEvent $event)
public onKernelException(Symfony\Component\HttpKernel\Event\ExceptionEvent $event)
public removeCspHeader(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
public onControllerArguments(Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent $event)
public getSubscribedEvents(): array
protected logException(Throwable $exception, string $message, null|string $logLevel): null
}$controller$controller$logger$logger$debug$debugarray<string, array> $exceptionsMappingarray<string, array> $exceptionsMappingprotected duplicateRequest(Throwable $exception, Symfony\Component\HttpFoundation\Request $request): Symfony\Component\HttpFoundation\Requestprotected duplicateRequest(Throwable $exception, Symfony\Component\HttpFoundation\Request $request): Symfony\Component\HttpFoundation\Request| exception | Throwable | |
| request | Symfony\Component\HttpFoundation\Request |
Symfony\Component\HttpFoundation\Request