hafas-client
hafas-client copied to clipboard
departures: throw if duration is above supported maximum
From https://github.com/derhuerst/compute-db-station-weight/blob/dda148fa533d7497b5d24737d2d1246407719aa9/index.js#L42-L43
Apparently, the DB API does not support querying departures for 1440 min (1 day) at once.
Throw if the passed value is above to prevent implementations from implicitly relying on this gotcha.
@juliuste do you know the limit for ÖBB?
This does not change the task of the issue but some up-to-date observations: For both DB and ÖBB I see exactly 1440 min as the limit (I did use hafas-client
for my requests). Requests with a higher duration do not get any more trips.