Skip to content

Commit 1b3bba6

Browse files
Update ApiExceptionHandler.php
1 parent 1a17a13 commit 1b3bba6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ApiExceptionHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Auth\AuthenticationException;
88
use Illuminate\Database\Eloquent\ModelNotFoundException;
99
use Illuminate\Http\Exceptions\HttpResponseException;
10+
use Illuminate\Http\Exceptions\ThrottleRequestsException;
1011
use Illuminate\Http\JsonResponse;
1112
use Illuminate\Support\Arr;
1213
use Illuminate\Support\Str;
@@ -79,8 +80,7 @@ private function prepareApiExceptionData(Throwable $exception): array
7980
} elseif ($exception instanceof ThrottleRequestsException) {
8081
$responseData['message'] = config('api-responses.rate_limit');
8182
$responseData['statusCode'] = 429;
82-
}
83-
else {
83+
} else {
8484
if (config('api-responses.show_500_error_message') && !empty($message)) {
8585
$responseData['message'] = $message;
8686
} else {

0 commit comments

Comments
 (0)