From fa8faca1b94c3e1a16918d8b906bc0bc554c3acc Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Tue, 8 Apr 2025 16:20:27 +0200 Subject: [PATCH] fix: #1051 --- psa_car_controller/web/view/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psa_car_controller/web/view/api.py b/psa_car_controller/web/view/api.py index 0269e68..3762592 100644 --- a/psa_car_controller/web/view/api.py +++ b/psa_car_controller/web/view/api.py @@ -195,7 +195,7 @@ def get_trips(): trips = trips_by_vin[car.vin] trips_as_dict = trips.get_trips_as_dict() return jsonify(trips_as_dict) - except (IndexError, TypeError): + except (IndexError, TypeError, KeyError): logger.debug("Failed to get trips, there is probably not enough data yet:", exc_info=True) return jsonify([])