tonhowtf/omniget · error · Error

ERR_SERVER

ERR_SERVER

Error message

ERR_SERVER

What it means

Sentinel error thrown in invite() when createInviteLink(guild.id, selectedChannelId) resolves to a falsy value — the backend declined or failed to create an invite without throwing, so the UI surfaces a generic server-side failure to the user.

Solutions

  1. Verify the user has Create Invite permission in the guild/channel
  2. Retry the invite creation; transient backend failures can resolve on a second attempt
  3. Inspect the createInviteLink backend response for a more specific error code and surface it instead of the generic sentinel
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/components/omnidisc/ChannelList.svelte:164 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/fb1c60ddb1ae2875. Report an issue: GitHub.

Appendix: source

Thrown at src/components/omnidisc/ChannelList.svelte:164

    }
    if (inVoice) return;
    switchTarget = null;
    await joinVoice(channel.id);
  }

  async function confirmSwitch() {
    const target = switchTarget;
    switchTarget = null;
    if (target) await joinVoice(target);
  }

  async function invite() {
    if (!guild || inviteState === "busy") return;
    inviteState = "busy";
    inviteError = null;
    try {
      const link = await createInviteLink(guild.id, selectedChannelId ?? undefined);
      if (!link) throw new Error("ERR_SERVER");
      await navigator.clipboard.writeText(link);
      inviteState = "copied";
    } catch (e) {
      inviteState = "failed";
      inviteError = translateBackendError(typeof e === "string" ? e : e instanceof Error ? e.message : String(e), $t);
    }
    if (inviteTimer) clearTimeout(inviteTimer);
    inviteTimer = setTimeout(() => {
      inviteState = "idle";
      inviteError = null;
    }, 4000);
  }
</script>

<aside class="channel-list" aria-label={$t("omnidisc.channels.title")}>
  <header class="head">
    <div class="head-text">
      <h2 class="title">{homeMode ? (instance?.name || $t("omnidisc.title")) : (guild?.name || instance?.name || $t("omnidisc.title"))}</h2>

View on GitHub (pinned to 8600b91f42)