mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 16:59:51 +00:00
AbstractHafasMobileProvider: Handle JSON API error LOCATION 'HCI Service: location missing or invalid'.
This commit is contained in:
parent
23b3bd7f6f
commit
0a6bc994fc
2 changed files with 3 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue