fixing missed step

This commit is contained in:
behzad
2022-01-22 21:30:15 +04:00
parent 91f96ceecd
commit cee0f49f32
30 changed files with 330 additions and 73 deletions
+4 -2
View File
@@ -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);
}
}