Skip to content

Commit 328e958

Browse files
committed
fix for TokenRefreshPlugin
1 parent 90453f3 commit 328e958

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Plugin/TokenRefreshPlugin.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,14 @@ private function refreshTokenAndRetry(RequestInterface $request, callable $first
7777
'expires_at' => $newTokens->expiresAt->format('Y-m-d H:i:s'),
7878
]);
7979

80-
return $first($newRequest);
80+
return $first($newRequest)->then(
81+
function (ResponseInterface $response) {
82+
return $response;
83+
},
84+
function (\Throwable $exception) {
85+
throw $exception;
86+
}
87+
);
8188
} catch (RefreshTokenExpiredException $e) {
8289
$this->logger->error('[GEOCACHING] Refresh token expired, user must re-authenticate', [
8390
'user_id' => $this->userId,

0 commit comments

Comments
 (0)