Symfony Exception

HttpException

HTTP 401 Unauthorized

Exception

Symfony\Component\HttpKernel\Exception\ HttpException

  1.     {
  2.         if ($code == 404) {
  3.             throw new NotFoundHttpException($message);
  4.         }
  5.         throw new HttpException($code$messagenull$headers);
  6.     }
  7.     /**
  8.      * Set the error handling for the application.
  9.      *
  1.      * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  2.      * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  3.      */
  4.     function abort($code$message '', array $headers = [])
  5.     {
  6.         app()->abort($code$message$headers);
  7.     }
  8. }
  9. if (! function_exists('app')) {
  10.     /**
  1.         if(in_array($request->header('Authorization'), $validSecrets))
  2.         {
  3.             return $next($request);
  4.         }
  5.         abort(Response::HTTP_UNAUTHORIZED);
  6.     }
  7. }
  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|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

HttpException
Symfony\Component\HttpKernel\Exception\HttpException:

  at /var/www/vsupport-booking-service/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:34
  at Laravel\Lumen\Application->abort(401, '', array())
     (/var/www/vsupport-booking-service/vendor/laravel/lumen-framework/src/helpers.php:24)
  at abort(401)
     (/var/www/vsupport-booking-service/app/Http/Middleware/AccessMiddleware.php:42)
  at App\Http\Middleware\AccessMiddleware->handle(object(Request), object(Closure))
     (/var/www/vsupport-booking-service/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/vsupport-booking-service/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(object(Request))
     (/var/www/vsupport-booking-service/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then(object(Closure))
     (/var/www/vsupport-booking-service/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline(array('App\\Http\\Middleware\\AccessMiddleware'), object(Closure))
     (/var/www/vsupport-booking-service/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch(null)
     (/var/www/vsupport-booking-service/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/vsupport-booking-service/public/index.php:28)