docs(routes): tighten the outage comments and notes

Shorter comments, changelog and CURRENT-STATE text for the 502 outage
path; the CURRENT-STATE paragraph now also names the 429 exception and
which budget expiry answers busy and which answers 502. Text only.
This commit is contained in:
German Khokhlov committed 2026-11-11 21:21:07 +04:00
1 parent a29611ca17
commit 82e2b716bc
7 files changed
+20 -36

No files matched your search

+2 -3
View File
@@ -21,7 +21,7 @@ export function createDirectionsSource({
signal,
headers: { Accept: 'application/json' },
});
// A failure page in front of the proxy need not be JSON.
// Proxy error pages may not be JSON.
let payload = null;
try {
payload = await response.json();
@@ -45,8 +45,7 @@ export function createDirectionsSource({
{ status: 429, refusal },
);
}
// A 5xx is a routing outage whatever its body says; only the proxy's
// refusals carry an error text worth showing.
// A 5xx body may mislabel an outage as a route refusal.
if (response.status >= 500 || (!response.ok && !payload?.error))
throw Object.assign(
new Error(`Routing unavailable (HTTP ${response.status})`),