ruvnet/RuView · warning · Error
HTTP ${resp.status}
Error message
HTTP ${resp.status} What it means
fetchCloud() in the point-cloud viewer throws `HTTP ${resp.status}` when the fetch to buildSplatsUrl() returns a non-2xx response. buildSplatsUrl() resolves to /api/splats for backend=auto or `${backendArg}/api/splats` for an explicit remote backend (and null for demo). The catch increments consecutiveFailures, records lastBackendError, and unless ?live=1 was passed, auto mode sets networkDisabled and falls back to demo frames.
Source
Thrown at v2/crates/wifi-densepose-pointcloud/src/viewer.html:509
var fetchTimer = null;
var lastBackendError = null;
function scheduleNextFetch(delayMs) {
if (fetchTimer) clearTimeout(fetchTimer);
fetchTimer = setTimeout(fetchCloud, delayMs);
}
async function fetchCloud() {
// Demo-only mode: never hit the network. Use the normal cadence.
if (backendArg === "demo" || networkDisabled) {
transportMode = "demo";
handleData(pickDemoFrame());
scheduleNextFetch(BASE_INTERVAL_MS);
return;
}
try {
var resp = await fetch(buildSplatsUrl(), { cache: "no-store" });
if (!resp.ok) throw new Error("HTTP " + resp.status);
var data = await resp.json();
transportMode = (backendArg === "auto") ? "live" : "remote";
consecutiveFailures = 0;
currentIntervalMs = BASE_INTERVAL_MS;
lastBackendError = null;
handleData(data);
scheduleNextFetch(BASE_INTERVAL_MS);
} catch (err) {
consecutiveFailures += 1;
lastBackendError = err && err.message ? err.message : String(err);
if (requireLive) {
document.getElementById("stats").innerHTML =
'<span class="demo">● OFFLINE</span><br>Live backend required (?live=1) but unreachable.<br><span class="label">' + lastBackendError + '</span>';
// Even strict-live: back off so we don't spam.
currentIntervalMs = Math.min(currentIntervalMs * 2, MAX_INTERVAL_MS);
scheduleNextFetch(currentIntervalMs);
return;
}View on GitHub (pinned to 4685618388)
Solutions
- Verify the backend directly: curl the exact buildSplatsUrl() target (e.g. curl -i 'http://host:port/api/splats') and confirm 200 with JSON
- Use ?backend=demo for a network-free demo, or remove ?live=1 so auto mode falls back to demo frames on failure
- For remote backends, re-check the scheme/host/port in ?backend= (trailing slashes are stripped) and that it serves /api/splats
- For 5xx responses, inspect the backend logs (lastBackendError is shown in the stats element) and restart the service
Defensive patterns
Strategy: fallback
Validate before calling
// Before enabling live mode, probe the exact URL the viewer will poll
async function splatsBackendReachable(splatsUrl) {
if (!splatsUrl) return false;
try {
const r = await fetch(splatsUrl, { cache: 'no-store' });
return r.ok;
} catch {
return false;
}
}
const url = buildSplatsUrl();
const live = url ? await splatsBackendReachable(url) : false;
// open viewer.html with ?backend=demo when !live Prevention
- Default to ?backend=demo for offline demos; use ?backend=auto only where the API is deployed
- Never combine ?live=1 with an unverified remote backend — it disables the demo fallback
- Watch the stats element: consecutiveFailures and lastBackendError reveal backend loss immediately
When it happens
Trigger: backend=auto but the page is served without the splats API so /api/splats returns 404; a remote ?backend=http://host:port whose service is down or returns 502/503 via a proxy; the backend throwing 500 while generating the splat frame; stale LAN address after the backend host changed.
Common situations: Opening viewer.html from a static host or file:// where /api/splats does not exist; the wifi-densepose-pointcloud service crashed while the page keeps polling; wrong port in ?backend=; reverse proxy in front of the backend returning 502.
Related errors
- Request failed
- status ${resp.status}
- Non-JSON response from {method} {path} (status {resp.status}
- Failed to create stream: {response.status}
- cannot bind HTTP listener on {http_addr}: {e}
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/d881966a5b0c38ef.
Report an issue: GitHub.