Hafas: Handle JSON API error H891 'No route found'.

This commit is contained in:
Andreas Schildbach 2015-10-23 21:59:15 +02:00
parent db5bbd9228
commit db63fec2db

View file

@ -1149,6 +1149,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
{
if ("H890".equals(err)) // No connections found.
return new QueryTripsResult(header, QueryTripsResult.Status.NO_TRIPS);
if ("H891".equals(err)) // No route found (try entering an intermediate station).
return new QueryTripsResult(header, QueryTripsResult.Status.NO_TRIPS);
if ("H895".equals(err)) // Departure/Arrival are too near.
return new QueryTripsResult(header, QueryTripsResult.Status.TOO_CLOSE);
if ("H9220".equals(err)) // Nearby to the given address stations could not be found.