fix: make BusProNet response failures diagnosable and non-fatal

This commit is contained in:
fromme committed 2026-09-19 11:36:14 +02:00
1 parent 29cedd5916
commit a05143bfbe
8 files changed
+207 -19

No files matched your search

@@ -6,6 +6,7 @@ use App\BusProNet\ApiClient;
use App\BusProNet\ApiClientException;
use App\BusProNet\Model\NotificationResponse;
use App\BusProNet\Model\Pickup;
use App\BusProNet\ResponseParserException;
use Psr\Log\LoggerInterface;
use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\ItemInterface;
@@ -35,7 +36,8 @@ class PickupDataProvider
return $response->getItems();
});
} catch (ApiClientException $e) {
} catch (ApiClientException|ResponseParserException $e) {
$this->logger->error('Unable to fetch pickup base data from BusProNet: '.$e->getMessage());
$pickups = [];
}