Exceptions
Exceptions 2
Symfony\Component\HttpKernel\Exception\ NotFoundHttpException
if ($referer = $request->headers->get('referer')) {
$message .= sprintf(' (from "%s")', $referer);
}
throw new NotFoundHttpException($message, $e);
} catch (MethodNotAllowedException $e) {
$message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), implode(', ', $e->getAllowedMethods()));
throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e);
}
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts(explode(',', $trustedHosts));
}
$kernel = new Kernel($env, $debug);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
if (isset($_SERVER['HTTP_ORIGIN'])) {
$response->headers->add([
'Access-Control-Allow-Origin' => ' ',
'Access-Control-Allow-Credentials' => 'true',
'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, OPTIONS, PATCH',
Symfony\Component\Routing\Exception\ ResourceNotFoundException
// add attributes based on the request (routing)
try {
// matching a request is more powerful than matching a URL path + context, so try that first
if ($this->matcher instanceof RequestMatcherInterface) {
$parameters = $this->matcher->matchRequest($request);
} else {
$parameters = $this->matcher->match($request->getPathInfo());
}
if (null !== $this->logger) {
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts(explode(',', $trustedHosts));
}
$kernel = new Kernel($env, $debug);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
if (isset($_SERVER['HTTP_ORIGIN'])) {
$response->headers->add([
'Access-Control-Allow-Origin' => ' ',
'Access-Control-Allow-Credentials' => 'true',
'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, OPTIONS, PATCH',
Stack Traces 2
[2/2] NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /" at vendor/symfony/http-kernel/EventListener/RouterListener.php:139 at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:104) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(EventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:212) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:44) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:141) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/http-kernel/HttpKernel.php:125) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:66) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:188) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:36) |
[1/2] ResourceNotFoundException |
---|
Symfony\Component\Routing\Exception\ResourceNotFoundException: None of the routers in the chain matched this request GET / HTTP/1.1 Accept: */* Accept-Encoding: gzip Host: api.paysdesaintomer.com Is: varnished Scheme: http User-Agent: Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/) X-B2n-Proxykey: 74879b2bc54464911bbd9c6d8678257c X-Forwarded-For: 199.45.154.159, 192.168.52.241, 192.168.52.241 X-Forwarded-Info: 6081,6081,192.168.52.174,192.168.52.174 X-Forwarded-Proto: http X-Php-Ob-Level: 1 X-Real-Ip: 199.45.154.159 X-Varnish: 2955065 at vendor/symfony-cmf/routing/src/ChainRouter.php:210 at Symfony\Cmf\Component\Routing\ChainRouter->doMatch('/', object(Request)) (vendor/symfony-cmf/routing/src/ChainRouter.php:158) at Symfony\Cmf\Component\Routing\ChainRouter->matchRequest(object(Request)) (vendor/symfony/http-kernel/EventListener/RouterListener.php:115) at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:104) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(EventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:212) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:44) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:141) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/http-kernel/HttpKernel.php:125) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:66) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:188) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:36) |