Exceptions
Exception
Symfony\Component\HttpKernel\Exception\ BadRequestHttpException
} catch (WebhookException $webhookException) {
$logMessage = \sprintf('[PayPal Webhook] %s', $webhookException->getMessage());
$logContext = ['type' => $webhookException->getEventType(), 'webhook' => \json_encode($webhook)];
$this->logger->error($logMessage, $logContext);
throw new BadRequestHttpException('An error occurred during execution of webhook');
} catch (\Exception $e) {
$this->logger->error($e->getMessage(), ['error' => $e]);
throw new BadRequestHttpException('An error occurred during execution of webhook');
}
WebhookController->tryToExecuteWebhook()
in
custom/plugins/SwagPayPal/src/Webhook/WebhookController.php
(line 104)
{
$token = $this->getShopwareToken($request);
$this->validateShopwareToken($token, $context);
$webhook = $this->createWebhookFromPostData($request);
$this->tryToExecuteWebhook($context, $webhook);
return new Response();
}
/**
in
vendor/symfony/http-kernel/HttpKernel.php
->
executeWebhook
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
in
vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php
->
handle
(line 86)
if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
}
try {
return $kernel->handle($request, $type, $catch);
} finally {
// restore global state
Request::setTrustedProxies($trustedProxies, $trustedHeaderSet);
}
}
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
::
handle
(line 481)
if ($this->surrogate) {
$this->surrogate->addSurrogateCapability($request);
}
// always a "master" request (as the real master request can be in cache)
$response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
/*
* Support stale-if-error given on Responses or as a config option.
* RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
* Cache-Control directives) that
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
forward
(line 271)
*/
protected function pass(Request $request, bool $catch = false)
{
$this->record($request, 'pass');
return $this->forward($request, $catch);
}
/**
* Invalidates non-safe methods (like POST, PUT, and DELETE).
*
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
pass
(line 287)
*
* @see RFC2616 13.10
*/
protected function invalidate(Request $request, bool $catch = false)
{
$response = $this->pass($request, $catch);
// invalidate only when the response is successful
if ($response->isSuccessful() || $response->isRedirect()) {
try {
$this->store->invalidate($request);
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
invalidate
(line 215)
}
$this->traces[$this->getTraceKey($request)] = [];
if (!$request->isMethodSafe()) {
$response = $this->invalidate($request, $catch);
} elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) {
$response = $this->pass($request, $catch);
} elseif ($this->options['allow_reload'] && $request->isNoCache()) {
/*
If allow_reload is configured and the client requests "Cache-Control: no-cache",
in
vendor/shopware/core/HttpKernel.php
->
handle
(line 156)
&& $container->getParameter('shopware.http.cache.enabled');
if ($enabled && $container->has(CacheStore::class)) {
$kernel = new static::$httpCacheClass($kernel, $container->get(CacheStore::class), null, ['debug' => $this->debug]);
}
$response = $kernel->handle($transformed, $type, $catch);
// fire event to trigger runtime events like seo url headers
$event = new BeforeSendResponseEvent($transformed, $response);
$container->get('event_dispatcher')->dispatch($event);
in
vendor/shopware/core/HttpKernel.php
->
doHandle
(line 81)
if (!\is_bool($catch)) {
Feature::triggerDeprecationOrThrow('v6.5.0.0', 'The third parameter `$catch` of `HttpKernel->handle()` will be typed to `bool`');
}
try {
return $this->doHandle($request, (int) $type, (bool) $catch);
} catch (Exception $e) {
/** @var Params|array{url?: string} $connectionParams */
$connectionParams = self::getConnection()->getParams();
$message = str_replace([$connectionParams['url'] ?? null, $connectionParams['password'] ?? null, $connectionParams['user'] ?? null], '******', $e->getMessage());
}
} else {
$kernel = new InstallerKernel($appEnv, $debug);
}
$result = $kernel->handle($request);
if ($result instanceof Response) {
$result->send();
$kernel->terminate($request, $result);
} else {
Logs
Level | Channel | Message |
---|---|---|
INFO 21:18:30 | php |
Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated { "exception": {} } |
INFO 21:18:30 | request |
Matched route "_profiler". { "route": "_profiler", "route_parameters": { "_route": "_profiler", "_controller": "web_profiler.controller.profiler::panelAction", "token": "latest" }, "request_uri": "https://dev.m-medientechnik.de/_profiler/latest?ip=173.0.81.65", "method": "GET" } |
INFO 21:18:30 | php |
User Deprecated: Since shopware/core : Class "Shopware\Storefront\Framework\Csrf\CsrfRouteListener" is deprecated and will be removed in v6.5.0.0. { "exception": {} } |
INFO 21:18:30 | php |
User Deprecated: Since shopware/core : Class "Shopware\Storefront\Framework\Csrf\CsrfRouteListener" is deprecated and will be removed in v6.5.0.0. { "exception": {} } |
INFO 21:18:30 | php |
User Deprecated: Since shopware/core : Class "Shopware\Core\Content\Mail\Service\MailerTransportFactory" is deprecated and will be removed in v6.5.0.0. { "exception": {} } |
INFO 21:18:30 | php |
User Deprecated: Since shopware/core : Class "Shopware\Core\Content\Mail\Service\MailerTransportFactory" is deprecated and will be removed in v6.5.0.0. { "exception": {} } |
INFO 21:18:30 | php |
User Deprecated: Since shopware/core : Class "Shopware\Storefront\Framework\Csrf\CsrfRouteListener" is deprecated and will be removed in v6.5.0.0. { "exception": {} } |
INFO 21:18:30 | php |
User Deprecated: Since shopware/core : Class "Shopware\Storefront\Framework\Csrf\CsrfRouteListener" is deprecated and will be removed in v6.5.0.0. { "exception": {} } |
Stack Trace
BadRequestHttpException
|
---|
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: An error occurred during execution of webhook at custom/plugins/SwagPayPal/src/Webhook/WebhookController.php:150 at Swag\PayPal\Webhook\WebhookController->tryToExecuteWebhook() (custom/plugins/SwagPayPal/src/Webhook/WebhookController.php:104) at Swag\PayPal\Webhook\WebhookController->executeWebhook() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86) at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:481) at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:271) at Symfony\Component\HttpKernel\HttpCache\HttpCache->pass() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:287) at Symfony\Component\HttpKernel\HttpCache\HttpCache->invalidate() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:215) at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle() (vendor/shopware/core/HttpKernel.php:156) at Shopware\Core\HttpKernel->doHandle() (vendor/shopware/core/HttpKernel.php:81) at Shopware\Core\HttpKernel->handle() (public/index.php:85) |