Skip to content

Commit

Permalink
Catch http errors in own code
Browse files Browse the repository at this point in the history
  • Loading branch information
gradinarufelix committed Oct 4, 2023
1 parent cc24437 commit b17e3d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Domain/Service/ZoomApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ private function fetchData($uri, string $paginatedDataKey): array
*/
private function fetchPaginatedData(string $uri, string $paginatedDataKey): array
{
$response = $this->client->get($uri);
$response = $this->client->get($uri, [
'http_errors' => false
]);
if ($response->getStatusCode() !== 200) {
throw new ZoomApiException(sprintf('Could not fetch Zoom paginated data for data key "%s", returned status "%s"', $paginatedDataKey, $response->getStatusCode()), 1695239983421);
}
Expand Down

0 comments on commit b17e3d6

Please sign in to comment.