Skip to content

Commit afb374d

Browse files
Report auth errors only if they occur after reauth
1 parent 2e9447e commit afb374d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Api/Clients/TiteLive/TiteLiveClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ private function requestApi(string $endpoint, $retries = 0): array
141141
->get($this->buildEndpointUrl($endpoint, null, $this->buildParamsForRequest()))
142142
->throw();
143143
} catch (\Exception $e) {
144-
report($e);
145-
146144
if ($e instanceof RequestException) {
147145
Log::error($e->response->getBody());
148146
$error = $e?->response->json();
@@ -164,6 +162,7 @@ private function requestApi(string $endpoint, $retries = 0): array
164162
}
165163
}
166164

165+
report($e);
167166
throw new TiteLiveBookNotFoundException('Unable to fetch data from titelive apis');
168167
}
169168

0 commit comments

Comments
 (0)