public-transport/hafas-client

departures: throw if duration is above supported maximum

Open

#14 opened on Jan 19, 2018

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (60 forks)github user discovery
add testsbreakingenhancementhelp wanted

Repository metrics

Stars
 (353 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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?

Contributor guide