{"record":{"id":"4a985e702157930e","repo":"openclaw/openclaw","slug":"unsupported-clickclack-target-raw","errorCode":null,"errorMessage":"Unsupported ClickClack target: ${raw}","messagePattern":"Unsupported ClickClack target: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/clickclack/src/target.ts","lineNumber":28,"sourceCode":"  const value = raw.trim();\n  if (!value) {\n    throw new Error(\"ClickClack target is required\");\n  }\n  const [prefix, ...rest] = value.split(\":\");\n  const body = rest.join(\":\").trim();\n  if (prefix === \"channel\" && body) {\n    return { chatType: \"group\", kind: \"channel\", id: body };\n  }\n  if (prefix === \"thread\" && body) {\n    return { chatType: \"group\", kind: \"thread\", id: body };\n  }\n  if (prefix === \"dm\" && body) {\n    return { chatType: \"direct\", kind: \"dm\", id: body };\n  }\n  if (!body) {\n    return { chatType: \"group\", kind: \"channel\", id: value };\n  }\n  throw new Error(`Unsupported ClickClack target: ${raw}`);\n}\n\n/** Formats a parsed ClickClack target back into canonical target syntax. */\nexport function buildClickClackTarget(target: ClickClackTarget): string {\n  return `${target.kind}:${target.id}`;\n}\n\n/** Normalizes user-entered ClickClack target text for channel routing. */\nexport function normalizeClickClackTarget(raw: string): string {\n  return buildClickClackTarget(parseClickClackTarget(raw));\n}\n\n/** Reports whether a target string can be offered to the ClickClack parser. */\nexport function looksLikeClickClackTarget(raw: string): boolean {\n  return /^(channel|thread|dm):/i.test(raw.trim()) || raw.trim().length > 0;\n}\n","sourceCodeStart":10,"sourceCodeEnd":45,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/clickclack/src/target.ts#L10-L45","documentation":"Thrown at the end of parseClickClackTarget (target.ts:28). The input is split on ':'; if a prefix and body both exist but the prefix is not one of the recognized kinds (channel, thread, dm), the target is rejected rather than guessed, to avoid silently misrouting messages.","triggerScenarios":"parseClickClackTarget('user:123'), parseClickClackTarget('group:general'), parseClickClackTarget('email:a@b.com').","commonSituations":"Using wrong target vocabulary (assuming 'group:' or 'user:' work); a channel name that contains a colon but lacks a known prefix; copy-paste from another tool's target syntax.","solutions":["Use a recognized prefix: 'channel:', 'thread:', or 'dm:'.","For a plain channel name with no prefix semantics, pass it bare (no colon) so it is treated as a channel."],"exampleFix":"// before\nparseClickClackTarget(\"group:general\")\n// after\nparseClickClackTarget(\"channel:general\")","handlingStrategy":"type-guard","validationCode":"const KNOWN_PREFIXES = /^(channel|thread|dm):/i;\nfunction isSupportedClickClackTarget(raw: string): boolean {\n  const v = raw.trim();\n  if (!v) return false;\n  return !v.includes(\":\") || KNOWN_PREFIXES.test(v);\n}","typeGuard":"function isSupportedClickClackTarget(raw: string): boolean {\n  const v = raw.trim();\n  if (!v) return false;\n  return !v.includes(\":\") || /^(channel|thread|dm):/i.test(v);\n}","tryCatchPattern":null,"preventionTips":["Use only channel:, thread:, dm:, or bare channel names.","Avoid inventing prefixes like group: or user:."],"tags":["clickclack","routing","validation"],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}