jackwener/OpenCLI · error · CommandExecutionError
HTTP ${probe.httpStatus} from Jike users/profile
Error message
HTTP ${probe.httpStatus} from Jike users/profile What it means
CommandExecutionError thrown by requireJikeIdentity when the identity probe reports kind 'http': the Jike users/profile API responded with an unexpected non-OK HTTP status (anything other than 2xx, 401, or 403). This signals a server-side or rate-limit problem rather than an authentication one.
Source
Thrown at clis/jike/utils.js:31
if (!token) return { kind: 'auth', detail: 'Jike JK_ACCESS_TOKEN missing from localStorage (anonymous)' };
const r = await fetch('https://api.ruguoapp.com/1.0/users/profile', {
headers: { 'x-jike-access-token': token, Accept: 'application/json' },
});
if (r.status === 401 || r.status === 403) return { kind: 'auth', detail: 'Jike users/profile HTTP ' + r.status };
if (!r.ok) return { kind: 'http', httpStatus: r.status };
const d = await r.json();
const u = d && d.user;
if (!u || !u.id) return { kind: 'auth', detail: 'Jike users/profile returned no user (anonymous)' };
return { ok: true, user_id: String(u.id), screen_name: String(u.screenName || ''), username: String(u.username || '') };
} catch (e) {
return { kind: 'exception', detail: String(e && e.message || e) };
}
})()`;
export async function requireJikeIdentity(page) {
const probe = await page.evaluate(JIKE_IDENTITY_PROBE);
if (probe?.kind === 'auth') throw new AuthRequiredError('web.okjike.com', probe.detail);
if (probe?.kind === 'http') throw new CommandExecutionError(`HTTP ${probe.httpStatus} from Jike users/profile`);
if (probe?.kind === 'exception') throw new CommandExecutionError(`Jike identity probe failed: ${probe.detail}`);
if (!probe?.ok) throw new CommandExecutionError(`Unexpected Jike identity probe: ${JSON.stringify(probe)}`);
return { user_id: probe.user_id, screen_name: probe.screen_name, username: probe.username };
}
export function normalizeJikeLimit(raw, defaultValue = 20) {
const limit = raw ?? defaultValue;
if (!Number.isInteger(limit) || limit < 1) {
throw new ArgumentError('--limit must be a positive integer');
}
return limit;
}
export async function postJikeApi(page, path, requestBody, label) {
const url = `https://api.ruguoapp.com${path}`;
const outcome = await page.evaluate(`(async () => {
const token = localStorage.getItem('JK_ACCESS_TOKEN') || '';
const deviceId = localStorage.getItem('JK_DEVICE_ID') || '';View on GitHub (pinned to 49907e53dc)
Solutions
- Wait and retry with backoff — 429/5xx are usually transient
- Check Jike API status by hitting the endpoint manually in the logged-in browser
- Reduce command frequency if rate limiting is suspected
- Update the CLI in case the profile endpoint path changed
Defensive patterns
Strategy: retry
Try / catch
try {
const identity = await verifyJikeIdentity(page);
} catch (e) {
if (/HTTP \d+ from Jike users\/profile/.test(e.message) && !e.message.includes('HTTP 401') && !e.message.includes('HTTP 403')) {
await sleep(backoff);
return verifyJikeIdentity(page); // retry with backoff
}
throw e;
} Prevention
- Throttle command frequency to avoid 429 rate limits
- Retry with exponential backoff on 5xx
- Monitor Jike API availability during outages
- Update the CLI if the endpoint path changes
When it happens
Trigger: Calling requireJikeIdentity while api.ruguoapp.com/1.0/users/profile returns e.g. 429 (rate limited), 500/502/503 (server error), or 404 from an API change.
Common situations: Hammering the API with rapid repeated commands triggering rate limiting; Jike API outage or maintenance window; a deployed API version change moving the endpoint.
Related errors
- HTTP_ERROR
- hf models failed: HTTP ${resp.status}
- Lobsters API HTTP ${res.status} for story ${shortId}
- stack exchange API error: ${data.error_message || data.error
- Trip.com poiSearch failed with status ${response.status}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/211ee7fb21a62403.
Report an issue: GitHub.