koala73/worldmonitor · error
${method} POST HTTP ${postResp.status}
Error message
${method} POST HTTP ${postResp.status} What it means
Thrown by SseSession.send when the POST of a JSON-RPC message to the server-advertised endpoint URL returned a non-2xx HTTP status. The SSE stream is up and the endpoint URL was re-validated against SSRF rules, but the server rejected the message POST itself (expired session, auth, or upstream error). The pending RPC deferred is rejected with this error and the timeout timer is cleared.
Source
Thrown at api/mcp-proxy.ts:484
this._pending.set(id, deferred);
const timer = setTimeout(() => {
if (this._pending.has(id)) {
this._pending.delete(id);
deferred.reject(new Error(`RPC ${method} timed out`));
}
}, SSE_RPC_TIMEOUT_MS);
try {
await revalidateBeforeFetch(new URL(this._endpointUrl));
const postResp = await fetch(this._endpointUrl, {
method: 'POST',
headers: { ...this._headers, 'Content-Type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', id, method, params }),
redirect: 'manual',
signal: AbortSignal.timeout(SSE_RPC_TIMEOUT_MS),
});
if (!postResp.ok) {
this._pending.delete(id);
throw new Error(`${method} POST HTTP ${postResp.status}`);
}
return await deferred.promise;
} finally {
clearTimeout(timer);
}
}
async notify(method, params) {
await revalidateBeforeFetch(new URL(this._endpointUrl));
await fetch(this._endpointUrl, {
method: 'POST',
headers: { ...this._headers, 'Content-Type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', method, params }),
redirect: 'manual',
signal: AbortSignal.timeout(5_000),
}).catch(() => {});
}
View on GitHub (pinned to 9361220cc0)
Solutions
- Inspect the status in the message: 404 commonly means the session/endpoint expired — reconnect to get a fresh endpoint event
- Ensure auth headers are applied to the POST as well as the SSE stream
- Retry the whole SSE session (connect + send) for transient 5xx failures
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at api/mcp-proxy.ts:482 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of koala73/worldmonitor@9361220cc0 (2026-08-21).
Data as JSON: /api/errors/7af1053a3e6f055a.
Report an issue: GitHub.