{
if ($code == 404) {
throw new NotFoundHttpException($message);
}
throw new HttpException($code, $message, null, $headers);
}
/**
* Set the error handling for the application.
*
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
function abort($code, $message = '', array $headers = [])
{
app()->abort($code, $message, $headers);
}
}
if (! function_exists('app')) {
/**
if(in_array($request->header('Authorization'), $validSecrets))
{
return $next($request);
}
abort(Response::HTTP_UNAUTHORIZED);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
$slice = parent::carry();
return ($slice($stack, $pipe))($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
{
if (count($middleware) > 0 && ! $this->shouldSkipMiddleware()) {
return (new Pipeline($this))
->send($this->make('request'))
->through($middleware)
->then($then);
}
return $then($this->make('request'));
}
}
return $this->handleDispatcherResponse(
$this->createDispatcher()->dispatch($method, $pathInfo)
);
});
} catch (Throwable $e) {
return $this->prepareResponse($this->sendExceptionToHandler($e));
}
}
* @param \Symfony\Component\HttpFoundation\Request|null $request
* @return void
*/
public function run($request = null)
{
$response = $this->dispatch($request);
if ($response instanceof SymfonyResponse) {
$response->send();
} else {
echo (string) $response;
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$app->run();
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) |