Handle API error more gracefully
This commit is contained in:
parent
e223a736e1
commit
fb6cc611c7
4 changed files with 44 additions and 26 deletions
4
sncf.ss
4
sncf.ss
|
@ -20,6 +20,10 @@
|
|||
(if station
|
||||
(get-station-id sncf-key station)
|
||||
(values "Vernon - Giverny (Vernon)" "stop_area:SNCF:87415604")))
|
||||
(unless station-name
|
||||
(set! station-name "Vernon - Giverny"))
|
||||
(unless station-id
|
||||
(set! station-id "stop_area:SNCF:87415604"))
|
||||
(define-values (departures disruptions) (get-departures sncf-key station-id datetime))
|
||||
(display-all departures disruptions station-name datetime)
|
||||
(when mattermost-url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue