AbstractHafasMobileProvider: Handle JSON API error LOCATION 'HCI Service: location missing or invalid'.

This commit is contained in:
Andreas Schildbach 2017-09-21 09:46:58 +02:00
parent 23b3bd7f6f
commit 0a6bc994fc
2 changed files with 3 additions and 1 deletions

View file

@ -441,6 +441,8 @@ public abstract class AbstractHafasMobileProvider extends AbstractHafasProvider
return new QueryTripsResult(header, QueryTripsResult.Status.TOO_CLOSE);
if ("FAIL".equals(err) && "HCI Service: request failed".equals(errTxt))
return new QueryTripsResult(header, QueryTripsResult.Status.SERVICE_DOWN);
if ("LOCATION".equals(err) && "HCI Service: location missing or invalid".equals(errTxt))
return new QueryTripsResult(header, QueryTripsResult.Status.UNKNOWN_LOCATION);
throw new RuntimeException(err + " " + errTxt);
}
final JSONObject res = svcRes.getJSONObject("res");