Symfony Exception

NotFoundHttpException

HTTP 404 Not Found

Exception

Symfony\Component\HttpKernel\Exception\ NotFoundHttpException

  1.      */
  2.     protected function handleDispatcherResponse($routeInfo)
  3.     {
  4.         switch ($routeInfo[0]) {
  5.             case Dispatcher::NOT_FOUND:
  6.                 throw new NotFoundHttpException;
  7.             case Dispatcher::METHOD_NOT_ALLOWED:
  8.                 throw new MethodNotAllowedHttpException($routeInfo[1]);
  9.             case Dispatcher::FOUND:
  10.                 return $this->handleFoundRoute($routeInfo);
  11.         }
  1.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  2.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  3.                 }
  4.                 return $this->handleDispatcherResponse(
  5.                     $this->createDispatcher()->dispatch($method$pathInfo)
  6.                 );
  7.             });
  8.         } catch (Throwable $e) {
  9.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  10.         }
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /docker/api3.baikehui.top/lumen-fw/app/Http/Middleware/PerformanceMiddleware.php (line 15)
  1.     public function handle($requestClosure $next)
  2.     {
  3.         $tracker PerformanceTracker::getInstance(true);
  4.         // $tracker->point('Request Start');
  5.         $response $next($request);
  6.         // $tracker->point('Request End');
  7.         $tracker->logReport();
  8.         // 防止内存泄漏(Swoole 长驻进程必须清理)
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
Pipeline->Laravel\Lumen\Routing\{closure}() in /docker/api3.baikehui.top/lumen-fw/app/Http/Middleware/RequestCountMiddleware.php (line 38)
  1.             // 避免统计失败影响正常请求流程,仅记录日志
  2.             $this->logError('请求计数失败', ['error' => $e->getMessage()]);
  3.         }
  4.         // 继续后续流程,获取响应对象
  5.         $response $next($request);
  6.         // 记录非 200 计数
  7.         try {
  8.             if (method_exists($response'getStatusCode') && $response->getStatusCode() !== 200) {
  9.                 $non200Key 'sys:non200:' date('Y-m-d');
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request  $request
  2.      * @return \Illuminate\Http\Response
  3.      */
  4.     public function handle(SymfonyRequest $request)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if (count($this->middleware) > 0) {
  8.             $this->callTerminableMiddleware($response);
  9.         }
Application->handle() in /docker/api3.baikehui.top/lumen-fw/start-server.php (line 170)
  1.         //     'file' => __DIR__ . '/storage/logs/access.log',
  2.         //     'content' => "[" . date('Y-m-d H:i:s') . "] {$uri}\n"
  3.         // ]);
  4.         
  5.         $response $app->handle(
  6.             $request Illuminate\Http\Request::capture()
  7.         );
  8.         
  9.         // 传递所有响应头到Swoole响应
  10.         foreach ($response->headers->all() as $name => $values) {
  11.             foreach ($values as $value) {
{closure}()

Stack Trace

NotFoundHttpException
Symfony\Component\HttpKernel\Exception\NotFoundHttpException:

  at /docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:233
  at Laravel\Lumen\Application->handleDispatcherResponse()
     (/docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:173)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/docker/api3.baikehui.top/lumen-fw/app/Http/Middleware/PerformanceMiddleware.php:15)
  at App\Http\Middleware\PerformanceMiddleware->handle()
     (/docker/api3.baikehui.top/lumen-fw/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/docker/api3.baikehui.top/lumen-fw/app/Http/Middleware/RequestCountMiddleware.php:38)
  at App\Http\Middleware\RequestCountMiddleware->handle()
     (/docker/api3.baikehui.top/lumen-fw/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/docker/api3.baikehui.top/lumen-fw/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/docker/api3.baikehui.top/lumen-fw/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:95)
  at Laravel\Lumen\Application->handle()
     (/docker/api3.baikehui.top/lumen-fw/start-server.php:170)
  at {closure}()