ruvnet/RuView · warning · Error
status ${resp.status}
Error message
status ${resp.status} What it means
Thrown by the OAuth status probe in ui/utils/quick-settings.js: it fetches GET /oauth/status with same-origin credentials and throws `status ${resp.status}` for any non-OK response other than 404 (404 is handled explicitly as 'server predating ADR-271'). The throw is immediately caught by the surrounding try/catch and rendered as 'Could not reach the server', so it represents any HTTP failure of the Cognitum sign-in status endpoint other than not-implemented.
Source
Thrown at ui/utils/quick-settings.js:295
// cookie. An XHR would follow the redirect invisibly and land nowhere useful.
export async function refreshSignInPanel(root = document) {
const status = root.querySelector('#qs-signin-status');
const signIn = root.querySelector('#qs-signin');
const signOut = root.querySelector('#qs-signout');
if (!status || !signIn || !signOut) return null;
let info;
try {
const resp = await fetch('/oauth/status', { credentials: 'same-origin' });
// 404 = a server predating ADR-271. Say so plainly rather than offering a
// button that will 404.
if (resp.status === 404) {
status.textContent = 'This server does not support Cognitum sign-in.';
signIn.hidden = true;
signOut.hidden = true;
return null;
}
if (!resp.ok) throw new Error(`status ${resp.status}`);
info = await resp.json();
} catch (err) {
status.textContent = `Could not reach the server (${err.message}).`;
signIn.hidden = true;
signOut.hidden = true;
return null;
}
if (info.signed_in) {
status.textContent = `Signed in${info.account ? ` as ${info.account}` : ''}${
info.scope ? ` - ${info.scope}` : ''
}`;
signIn.hidden = true;
signOut.hidden = false;
} else if (info.browser_signin) {
status.textContent = info.auth_required
? 'This server requires sign-in.'
: 'Optional: sign in to use your Cognitum account.';View on GitHub (pinned to 4685618388)
Solutions
- Check the API server implements /oauth/status per ADR-271 and that its OAuth client settings (client id/secret/redirect) are configured
- Open the network tab and read the response body of the failing /oauth/status call to find the real server-side error
- Fix reverse-proxy routing so /oauth/* reaches the API process
- If the deployment intentionally predates ADR-271, expect 404 and the friendly 'does not support Cognitum sign-in' path instead
Example fix
// before
if (!resp.ok) throw new Error(`status ${resp.status}`);
// after: keep the plain message but log the body for diagnosis
if (!resp.ok) {
const body = await resp.text().catch(() => '');
console.warn('/oauth/status failed', resp.status, body);
throw new Error(`status ${resp.status}`);
} Defensive patterns
Strategy: try-catch
Try / catch
try {
const resp = await fetch('/oauth/status', { credentials: 'same-origin' });
if (resp.status === 404) {
// server predates ADR-271: hide sign-in UI, not an error
} else if (resp.status >= 500) {
// server-side failure: retry later, show server error state
} else if (!resp.ok) {
throw new Error(`status ${resp.status}`);
}
} catch (err) {
// network-level failure (offline, DNS, proxy): show offline state
status.textContent = `Could not reach the server (${err.message}).`;
} Prevention
- Smoke-test /oauth/status after every proxy or server upgrade
- Keep the 404 special-case in sync with the minimum supported server version
- Log the response body on non-OK statuses so misconfiguration is diagnosable from the client
When it happens
Trigger: /oauth/status returning 500/502/503/504 because the auth backend or its upstream is down; a reverse proxy not routing /oauth/* to the API server; a 401/400 from a misconfigured OAuth client; a gateway timeout behind nginx/Caddy.
Common situations: Reverse proxy config missing the /oauth/ location block; OAuth client id/secret unset so the endpoint errors; API server mid-restart; corporate proxy intercepting same-origin requests.
Related errors
- Request failed
- Invalid settings file format
- Invalid stream options: ${validationResult.errors.join(', ')
- No active stream connection to reconnect
- Cannot get connection stats for reconnection
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/978df78f87b96402.
Report an issue: GitHub.