From 23cfec1ef7b3284f52076ca9b715496a88e18e78 Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 23 Feb 2023 16:22:21 +0100 Subject: [PATCH] Bypass the token caching in case of 401 Status Code --- src/Connection/FluentFMRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connection/FluentFMRepository.php b/src/Connection/FluentFMRepository.php index 32a4476..21a1229 100644 --- a/src/Connection/FluentFMRepository.php +++ b/src/Connection/FluentFMRepository.php @@ -371,7 +371,7 @@ public function get() $results = ($this->callback)(); } catch (\Exception $e) { if ($e->getCode() === 401 || $e->getCode() === 952) { - $this->getToken(); + $this->getToken(true); $results = ($this->callback)(); } elseif ($e instanceof RequestException && $response = $e->getResponse()) { Response::check($response, $this->queryString());