diff --git a/src/ext/java/org/opentripplanner/ext/siri/SiriTimetableSnapshotSource.java b/src/ext/java/org/opentripplanner/ext/siri/SiriTimetableSnapshotSource.java index eab0496c4f2..345f8deba20 100644 --- a/src/ext/java/org/opentripplanner/ext/siri/SiriTimetableSnapshotSource.java +++ b/src/ext/java/org/opentripplanner/ext/siri/SiriTimetableSnapshotSource.java @@ -4,7 +4,7 @@ import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.NOT_MONITORED; import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.NO_FUZZY_TRIP_MATCH; import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.NO_START_DATE; -import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.NO_TRIP_ID; +import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.TRIP_NOT_FOUND; import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.TRIP_NOT_FOUND_IN_PATTERN; import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.UNKNOWN; @@ -325,7 +325,7 @@ private Result handleModifiedTrip( trip = tripAndPattern.trip(); pattern = tripAndPattern.tripPattern(); } else { - return UpdateError.result(null, NO_TRIP_ID); + return UpdateError.result(null, TRIP_NOT_FOUND); } Timetable currentTimetable = getCurrentTimetable(pattern, serviceDate); diff --git a/src/ext/java/org/opentripplanner/ext/siri/updater/SiriETHttpTripUpdateSource.java b/src/ext/java/org/opentripplanner/ext/siri/updater/SiriETHttpTripUpdateSource.java index 9dab72446ea..b3abe95dfc2 100644 --- a/src/ext/java/org/opentripplanner/ext/siri/updater/SiriETHttpTripUpdateSource.java +++ b/src/ext/java/org/opentripplanner/ext/siri/updater/SiriETHttpTripUpdateSource.java @@ -49,7 +49,7 @@ public Optional getUpdates() { long t1 = System.currentTimeMillis(); try { var siri = siriLoader.fetchETFeed(requestorRef); - if (siri.isEmpty()) { + if (siri.map(Siri::getServiceDelivery).isEmpty()) { return Optional.empty(); }