The international conference on the API Platform Framework
Learn more about the event, register for the conference, and get ready for two days of inspiration, ideas, and knowledge-sharing with our incredible lineup of renowned specialists and advocates.
Register nowThis 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): null
public onKernelException(Symfony\Component\HttpKernel\Event\ExceptionEvent $event): null
public removeCspHeader(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
public onControllerArguments(Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent $event): null
public getSubscribedEvents(): array
protected logException(Throwable $exception, string $message, null|string $logLevel): null
}
object|array|string $controller
Psr\Log\LoggerInterface $logger
bool $debug
array<string, array> $exceptionsMapping
protected duplicateRequest(Throwable $exception, Symfony\Component\HttpFoundation\Request $request): Symfony\Component\HttpFoundation\Request
exception | Throwable | |
request | Symfony\Component\HttpFoundation\Request |
Symfony\Component\HttpFoundation\Request
Made with love by
Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.
Learn more