tonhowtf/omniget · warning
[omnidisc] gateway error
Error message
[omnidisc] gateway error
What it means
The gateway event listener receives a GATEWAY_ERROR event emitted by the Rust backend when the persistent websocket to an instance errors (connection dropped, handshake failed, protocol violation, server-sent error frame). The store logs the instance URL and payload `d` and returns — the error is informational; reconnection behavior is driven separately by handleStatus.
Solutions
- Inspect the logged `d` payload for the underlying websocket error reason
- Confirm the instance URL is correct and reachable (curl its REST endpoint)
- Check whether status events show a reconnect — if not, call connectGateway again for that instance
- If errors persist across reconnects, check network/firewall/proxy websocket support
Defensive patterns
Strategy: fallback
Validate before calling
// verify reachability when configuring the instance
const ok = await fetch(`${url.replace(/\/$/, "")}/api/health`).then(r => r.ok).catch(() => false);
Try / catch
case "GATEWAY_ERROR":
console.warn("[omnidisc] gateway error", instance.url, d);
scheduleReconnect(instance); // fallback: attempt reconnect
return; Prevention
- Validate instance URLs at add-time (scheme, host, port)
- Implement reconnect with backoff on GATEWAY_ERROR
- Monitor status events alongside error events to know when reconnection succeeds
When it happens
Trigger: Backend gateway task emits `omnidisc://dispatch` with t="GATEWAY_ERROR" whenever its websocket errors: server closed the socket, DNS/TLS failure, invalid gateway URL, heartbeat timeout, or an error frame from the remote server.
Common situations: Instance server restart or maintenance window; laptop sleep/resume killing the socket; misconfigured instance URL (wrong port/protocol); firewall or proxy blocking long-lived websockets.
Related errors
- Edge TTS: conexao recusada ({})
- [omnidisc] could not sign out of
- [omnidisc] could not load messages
- [omnidisc] could not load older messages
- YouTube não retornou URL
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/744c3041497c4dfe.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/stores/omnidisc-store.svelte.ts:1353
return;
}
case "PRESENCE_UPDATE_BULK": {
for (const item of Array.isArray(d) ? d : []) {
const p = parsePresence(item);
if (p) setPresence(instance.id, p.userId, p.status);
}
return;
}
case "USER_UPDATE": {
const user = parseUser(d);
if (user) upsertUser(instance.id, user);
return;
}
case "VOICE_STATE_UPDATE":
applyVoiceState(instance.id, d);
return;
case "GATEWAY_ERROR":
console.warn("[omnidisc] gateway error", instance.url, d);
return;
default:
return;
}
}
function mapStatus(ev: GatewayStatusEvent): { status: InstanceStatus; error?: string } {
switch (ev.status) {
case "ready":
return { status: "connected" };
case "connecting":
return { status: "connecting" };
case "reconnecting":
return { status: "reconnecting", error: ev.error ?? undefined };
case "disconnected":
default:
if (ev.error === ERR_UNAUTHORIZED || ev.error === ERR_NO_SESSION) return { status: "signed_out", error: ev.error };
if (ev.error) return { status: "error", error: ev.error };View on GitHub (pinned to 8600b91f42)