{"record":{"id":"fb1c60ddb1ae2875","repo":"tonhowtf/omniget","slug":"err-server","errorCode":"ERR_SERVER","errorMessage":"ERR_SERVER","messagePattern":"ERR_SERVER","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/components/omnidisc/ChannelList.svelte","lineNumber":164,"sourceCode":"    }\n    if (inVoice) return;\n    switchTarget = null;\n    await joinVoice(channel.id);\n  }\n\n  async function confirmSwitch() {\n    const target = switchTarget;\n    switchTarget = null;\n    if (target) await joinVoice(target);\n  }\n\n  async function invite() {\n    if (!guild || inviteState === \"busy\") return;\n    inviteState = \"busy\";\n    inviteError = null;\n    try {\n      const link = await createInviteLink(guild.id, selectedChannelId ?? undefined);\n      if (!link) throw new Error(\"ERR_SERVER\");\n      await navigator.clipboard.writeText(link);\n      inviteState = \"copied\";\n    } catch (e) {\n      inviteState = \"failed\";\n      inviteError = translateBackendError(typeof e === \"string\" ? e : e instanceof Error ? e.message : String(e), $t);\n    }\n    if (inviteTimer) clearTimeout(inviteTimer);\n    inviteTimer = setTimeout(() => {\n      inviteState = \"idle\";\n      inviteError = null;\n    }, 4000);\n  }\n</script>\n\n<aside class=\"channel-list\" aria-label={$t(\"omnidisc.channels.title\")}>\n  <header class=\"head\">\n    <div class=\"head-text\">\n      <h2 class=\"title\">{homeMode ? (instance?.name || $t(\"omnidisc.title\")) : (guild?.name || instance?.name || $t(\"omnidisc.title\"))}</h2>","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src/components/omnidisc/ChannelList.svelte#L146-L182","documentation":"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.","triggerScenarios":"Thrown at src/components/omnidisc/ChannelList.svelte:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the user has Create Invite permission in the guild/channel","Retry the invite creation; transient backend failures can resolve on a second attempt","Inspect the createInviteLink backend response for a more specific error code and surface it instead of the generic sentinel"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}