Write http errors for API to log
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Log;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Exception;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
@@ -64,6 +64,8 @@ class Handler extends ExceptionHandler
|
||||
$http_code = 404;
|
||||
}
|
||||
|
||||
Log::error($exception->getMessage());
|
||||
|
||||
return response()->json([
|
||||
'error' => [
|
||||
'code' => $exception->getCode() ,
|
||||
|
||||
Reference in New Issue
Block a user