From b17e3d63541b06bec5162cd5ae065418e420e5e3 Mon Sep 17 00:00:00 2001 From: Felix Gradinaru Date: Wed, 4 Oct 2023 10:21:21 +0200 Subject: [PATCH] Catch http errors in own code --- Classes/Domain/Service/ZoomApiService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Domain/Service/ZoomApiService.php b/Classes/Domain/Service/ZoomApiService.php index bb842a2..f4a315e 100644 --- a/Classes/Domain/Service/ZoomApiService.php +++ b/Classes/Domain/Service/ZoomApiService.php @@ -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); }