File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,11 @@ def get(self) -> Dict[str, Any]:
275275 else :
276276 raise PredictionError (response ['error' ]['description' ])
277277 else :
278- raise ConnectionError (f'connection raised error { response .status_code } ' )
278+ try :
279+ error = response .json ()['error' ]['description' ]
280+ except :
281+ error = ''
282+ raise ConnectionError (f'connection raised error { response .status_code } for { response .url } - { error } ' )
279283
280284 @property
281285 def predict (self ) -> PredictedTrajectory :
@@ -471,7 +475,7 @@ def get_predictions(
471475 if float_altitude is not None and not packet_track .falling :
472476 packets_at_float_altitude = packet_track [
473477 numpy .abs (float_altitude - packet_track .altitudes ) < float_altitude_uncertainty
474- ]
478+ ]
475479 if (
476480 len (packets_at_float_altitude ) > 0
477481 and packets_at_float_altitude [- 1 ].time == packet_track .times [- 1 ]
@@ -481,7 +485,7 @@ def get_predictions(
481485 elif packet_track .ascent_rates [- 1 ] >= 0 :
482486 prediction_float_start_time = prediction_start_time + timedelta (
483487 seconds = (float_altitude - prediction_start_location [2 ])
484- / prediction_ascent_rate
488+ / prediction_ascent_rate
485489 )
486490 descent_only = False
487491 else :
You can’t perform that action at this time.
0 commit comments