Skip to content

Commit 76ba543

Browse files
committed
fix(laravel-api-problem): fix exception AuthorizationException for status code 403
1 parent 8d2eee2 commit 76ba543

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/LaravelApiProblem.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Pedrosalpr\LaravelApiProblem;
66

7+
use Illuminate\Auth\Access\AuthorizationException;
78
use Illuminate\Http\JsonResponse;
89
use Illuminate\Http\Request;
910
use Illuminate\Http\Response;
@@ -32,6 +33,7 @@ public function __construct(
3233
ValidationException::class => $this->validation(),
3334
\UnhandledMatchError::class,\Exception::class => $this->default(),
3435
HttpException::class => $this->default(419),
36+
AuthorizationException::class => $this->default(403),
3537
default => $this->default()
3638
};
3739
}

0 commit comments

Comments
 (0)