From db5bbd9228b96521cc64061cee445182ce8a55a4 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sat, 3 Oct 2015 21:26:40 +0200 Subject: [PATCH] Hafas: Handle JSON API error H9360 'Date outside of the timetable period'. --- enabler/src/de/schildbach/pte/AbstractHafasProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/enabler/src/de/schildbach/pte/AbstractHafasProvider.java b/enabler/src/de/schildbach/pte/AbstractHafasProvider.java index c3ac15a7..57be9127 100644 --- a/enabler/src/de/schildbach/pte/AbstractHafasProvider.java +++ b/enabler/src/de/schildbach/pte/AbstractHafasProvider.java @@ -1153,6 +1153,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider return new QueryTripsResult(header, QueryTripsResult.Status.TOO_CLOSE); if ("H9220".equals(err)) // Nearby to the given address stations could not be found. return new QueryTripsResult(header, QueryTripsResult.Status.UNRESOLVABLE_ADDRESS); + if ("H9360".equals(err)) // Date outside of the timetable period. + return new QueryTripsResult(header, QueryTripsResult.Status.INVALID_DATE); final String errTxt = svcRes.getString("errTxt"); throw new RuntimeException(err + ": " + errTxt); }