AbstractHafasClientInterfaceProvider: Handle 'HCI Service: problems during service execution' error in jsonStationBoard() and jsonTripSearch().

This commit is contained in:
Andreas Schildbach 2018-12-17 21:24:31 +01:00
parent ac26926ef8
commit c4576c399e

View file

@ -283,6 +283,8 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
return new QueryDeparturesResult(header, QueryDeparturesResult.Status.INVALID_STATION);
if ("FAIL".equals(err) && "HCI Service: request failed".equals(errTxt))
return new QueryDeparturesResult(header, QueryDeparturesResult.Status.SERVICE_DOWN);
if ("PROBLEMS".equals(err) && "HCI Service: problems during service execution".equals(errTxt))
return new QueryDeparturesResult(header, QueryDeparturesResult.Status.SERVICE_DOWN);
if ("CGI_READ_FAILED".equals(err))
return new QueryDeparturesResult(header, QueryDeparturesResult.Status.SERVICE_DOWN);
throw new RuntimeException(err + " " + errTxt);
@ -540,6 +542,8 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
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 ("PROBLEMS".equals(err) && "HCI Service: problems during service execution".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);
if ("CGI_READ_FAILED".equals(err))