{"record":{"id":"3feacb2265899908","repo":"jackwener/OpenCLI","slug":"e-message-rethrown-from-assertmessageidshape-3feacb","errorCode":null,"errorMessage":"${e.message} (rethrown from assertMessageIdShape; e.g. messageId \"${v}\" is not a full UUID)","messagePattern":"(.+?) \\(rethrown from assertMessageIdShape; e\\.g\\. messageId \"(.+?)\" is not a full UUID\\)","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"clis/slock/reaction-remove.js","lineNumber":27,"sourceCode":"cli({\n  site: SLOCK_SITE,\n  name: 'reaction-remove',\n  access: 'write',\n  description: 'Remove your emoji reaction from a message (DELETE /messages/:id/reactions).',\n  domain: SLOCK_DOMAIN,\n  strategy: Strategy.COOKIE,\n  browser: true,\n  siteSession: 'persistent',\n  args: [\n    { name: 'messageId', positional: true, required: true, help: 'Full messageId UUID (short ids rejected)' },\n    { name: 'emoji', positional: true, required: true, help: 'The unicode emoji to remove, e.g. 👍' },\n    { name: 'server', help: 'Override active server' },\n  ],\n  columns: ['messageId', 'emoji', 'result'],\n  func: async (page, kwargs) => {\n    let id;\n    try { id = assertMessageIdShape(String(kwargs.messageId ?? '')); }\n    catch (e) { throw new ArgumentError(e.message); }\n    const emoji = String(kwargs.emoji ?? '').trim();\n    if (!emoji) throw new ArgumentError('emoji required (the unicode emoji to remove)');\n    await page.goto(SLOCK_HOME_URL);\n    const snippet = buildFetchSnippet({\n      method: 'DELETE',\n      path: `/messages/${id}/reactions`,\n      body: { emoji },\n      serverScoped: true,\n      serverIdOverride: kwargs.server,\n    });\n    const result = await page.evaluate(`(async () => { ${snippet} })()`);\n    dispatchEvaluateResult(result);\n    return [{ messageId: id, emoji, result: 'removed' }];\n  },\n});\n","sourceCodeStart":9,"sourceCodeEnd":43,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/slock/reaction-remove.js#L9-L43","documentation":"reaction-remove validates --messageId with assertMessageIdShape exactly like reaction-add; a non-UUID or empty value is rethrown as an ArgumentError with the 'rethrown from assertMessageIdShape' prefix. Full UUIDs are required because the in-page fetch DELETEs `/messages/<uuid>/reactions`.","triggerScenarios":"Calling `slock reaction-remove` with --messageId that is empty or fails UUID_RE — most commonly the 8-hex short id from channel headers, a Slack-style timestamp, or a truncated/partially pasted UUID.","commonSituations":"Reusing a short id copied from a channel header banner; copying only part of a long UUID; passing a message index or number instead of an id; stale notes containing ids from an older Slock format.","solutions":["Fetch the full message UUID via `bookmark-list` or `message-read` and use it for --messageId","Validate the value against the UUID 8-4-4-4-12 hex pattern before running","Re-copy the id carefully, ensuring no truncation"],"exampleFix":"// before\n$ slock reaction-remove --messageId 9f8e7d6c --emoji 👍\n// after\n$ slock reaction-remove --messageId 9f8e7d6c-1111-2222-3333-abcdef012345 --emoji 👍","handlingStrategy":"validation","validationCode":"const UUID_RE = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;\nif (!UUID_RE.test(String(messageId ?? ''))) throw new Error(`--messageId must be a full UUID, got: ${messageId}`);","typeGuard":"function isMessageId(v) {\n  return typeof v === 'string' &&\n    /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(v);\n}","tryCatchPattern":"try {\n  await cli('reaction-remove', { messageId, emoji });\n} catch (e) {\n  if (e instanceof ArgumentError && e.message.includes('not a full UUID')) {\n    console.error(`\"${messageId}\" is not a full UUID; use message-read/bookmark-list output instead of header short ids.`);\n  } else throw e;\n}","preventionTips":["Resolve short ids to full UUIDs before calling message-scoped commands","Reuse the messageId column from message-send output as the source of truth","Add a UUID regex check wherever ids are ingested from user input","Never hand-type UUIDs — copy/paste and verify length (36 chars)"],"tags":["argument-validation","uuid","input-validation"],"backgroundTag":"invalid-argument-format","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}