Commit a86708b
committed
Handle 404 from CHS tide API without crashing or nuking stations
The CHS API sometimes returns 404 for station tide data requests.
Previously this raised an unhandled Mechanize::ResponseCodeError
through the entire Sinatra stack. Now we catch 404 specifically,
log a warning, and return nil — keeping the station in the list
so it can be retried on subsequent requests.1 parent 211a6a0 commit a86708b
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
| |||
0 commit comments