mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix(traffic): say which upstream declined a road load
Street Traffic draws on OpenStreetMap for geometry and TomTom for flow, and the row said "Road data temporarily unavailable" whichever one failed. The reporter of #661 went and verified a TomTom key while every public Overpass mirror was refusing their network with HTTP 406 — a status fetchRoads already had and dropped on the floor. Classify the refusal where the layer talks to Overpass: 429 is "Overpass rate-limited", 504 is "Overpass timed out", anything else is "Overpass refused the road query (HTTP <status>)". The first two are the words alpr's Overpass source already uses; the status is what says which upstream declined, which a single-source layer never has to. The error carries its status as a RoadRequestError, following LiveSourceError in src/sources/live/contract.js, so a caller can branch on the code without parsing English. The catch promotes a classified refusal and keeps the general line for everything else — the branch is on the error type, not on its text, because a dropped socket throws whatever the platform felt like saying and "Failed to fetch" on a panel row helps nobody. Retries, backoff, caching and the mirror rotation are untouched.
This commit is contained in:
1 parent
0dbde1e36c
commit
c24399e99d
6 files changed
+149
-4
No files matched your search
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
- Report which upstream declined a Street Traffic road load. The layer row now
|
||||
reads `Overpass rate-limited`, `Overpass timed out`, or
|
||||
`Overpass refused the road query (HTTP 406)` instead of a general
|
||||
"Road data temporarily unavailable", so a reader is not sent to check a
|
||||
TomTom key when the public OpenStreetMap mirrors are the side that failed.
|
||||
Failures the layer cannot classify keep the general line.
|
||||
|
||||
- Enable responsive trackpad pinch zoom on the globe. Browser pixel-mode
|
||||
`Ctrl+wheel` pinch gestures now reach Cesium with bounded amplification,
|
||||
while ordinary wheel, line-mode and touch-pinch inputs retain their existing
|
||||
|
||||
Reference in new issue
Block a user