{"record":{"id":"6f94c28d0cd0aec1","repo":"openclaw/openclaw","slug":"clickclack-channel-not-found-channel","errorCode":null,"errorMessage":"ClickClack channel not found: ${channel}","messagePattern":"ClickClack channel not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"extensions/clickclack/src/resolve.ts","lineNumber":41,"sourceCode":"\n/**\n * Resolves a channel name/id from config or target input to a ClickClack\n * channel id.\n */\nexport async function resolveChannelId(\n  client: ClickClackClient,\n  workspaceId: string,\n  channel: string,\n) {\n  if (channel.startsWith(\"chn_\")) {\n    return channel;\n  }\n  const channels = await client.channels(workspaceId);\n  const found = channels.find(\n    (candidate) => candidate.id === channel || candidate.name === channel,\n  );\n  if (!found) {\n    throw new Error(`ClickClack channel not found: ${channel}`);\n  }\n  return found.id;\n}\n","sourceCodeStart":23,"sourceCodeEnd":45,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/clickclack/src/resolve.ts#L23-L45","documentation":"Thrown by resolveChannelId when the configured or input channel identifier (name or id) doesn't match any channel returned by client.channels(workspaceId). The channel doesn't exist in the workspace or the bot can't see it.","triggerScenarios":"Channel resolution is called with a channel name or id that doesn't match any channel in the workspace's channel list. The bot token doesn't have visibility of the channel, or it was deleted.","commonSituations":"Channel was deleted or renamed; bot wasn't added to the channel; typo in channel name/id in config or target input; channel is private and bot lacks membership; workspace context mismatch.","solutions":["Verify the channel name/id exists in the target ClickClack workspace.","Use the channel id (prefixed with chn_) directly to avoid name ambiguity.","Ensure the bot is a member of the channel, especially for private channels.","List channels via the ClickClack API to find the correct identifier."],"exampleFix":"// before: channel name that may not resolve\nconst channelId = await resolveChannelId(client, workspaceId, \"general-discussion\");\n// after: use the stable channel id\nconst channelId = await resolveChannelId(client, workspaceId, \"chn_xyz789abc\");","handlingStrategy":"validation","validationCode":"import { resolveChannelId } from \"./resolve.js\";\n\n// Validate before use\nconst channels = await client.channels(workspaceId);\nconst configured = config.channel;\nconst exists = channels.some((c) => c.id === configured || c.name === configured);\nif (!exists && !configured.startsWith(\"chn_\")) {\n  throw new Error(`Channel \"${configured}\" not found in workspace ${workspaceId}.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const channelId = await resolveChannelId(client, workspaceId, channel);\n} catch (error) {\n  if (error instanceof Error && error.message.includes(\"channel not found\")) {\n    logger.error(`Channel \"${channel}\" not found in workspace. Available: ${channels.map((c) => c.name).join(\", \")}`);\n  }\n  throw error;\n}","preventionTips":["Use the stable channel id (chn_ prefix) to avoid name resolution failures.","Ensure the bot is a member of private channels it needs to resolve.","Verify channel existence after workspace reorganizations or renames."],"tags":["resolve","channel","config","not-found"],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}