Closed jhennrich closed 4 years ago
Fixed in 384a5a7, thanks :)
Now, an exception is thrown when perform_api_request
gets a response with an non-ok status code. (this should have always been the case and I'm surprised you're the first person to notice or complain)
When calling
get_route
with an invalid date (I tried several dates, all before 2019-12-15 were invalid for me) the api crashes with:This error occurs, because the dict that is returned from
_perform_api_request
looks like this:{'type': 'http://apps.mvg-fahrinfo.de/v12/rest/2.0/error/routing_request_invalid_date', 'title': 'invalid date maybe after time table change'}
Fix: there should be a check after
_perform_api_request
if the returned dict contains actual content or an error message. I do not know by which rule it is determined, whether a date is correct.Best regards ~