Skip to content

Commit

Permalink
Fix an error when logging error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Sep 26, 2024
1 parent fce702a commit d176752
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/base/OAuthProviderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ public function getAccessToken(): OAuth1Token|OAuth2Token|null
$error = $request->getParam('error_code');

if ($error) {
Auth::error('An error occurred: {error}.', Json::encode($error));
if (is_array($error)) {
$error = Json::encode($error);
}

Auth::error('An error occurred: {error}.', $error);

throw new Exception('An error occurred.');
}
Expand Down

0 comments on commit d176752

Please sign in to comment.