mirror of
https://gitlab.com/izyim/prototypes/lumen-microservices/microservice-api-gateway.git
synced 2026-08-19 04:24:15 +00:00
fixing missed step
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use App\Traits\ApiResponse;
|
||||
@@ -13,6 +15,8 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
use function env;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
use ApiResponse;
|
||||
@@ -51,7 +55,6 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
{
|
||||
|
||||
if ($exception instanceof HttpException) {
|
||||
$errorCode = $exception->getStatusCode();
|
||||
$errorMessage = Response::$statusTexts[$errorCode];
|
||||
@@ -99,6 +102,5 @@ class Handler extends ExceptionHandler
|
||||
return $this->errorResponse(
|
||||
"Unexpected error. Try later!",
|
||||
Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user