{"record":{"id":"f35276e015f63b8b","repo":"moeru-ai/airi","slug":"tweet-id-is-empty-please-provide-a-tweet-id-to-re","errorCode":null,"errorMessage":"Tweet ID is empty. Please provide a tweet ID to retweet.","messagePattern":"Tweet ID is empty\\. Please provide a tweet ID to retweet\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"integrations/twitter-services/src/adapters/airi-adapter.ts","lineNumber":178,"sourceCode":"  }\n\n  private async handleLikeTweet(content: string): Promise<void> {\n    if (content) {\n      await this.twitterServices.tweet.likeTweet(content)\n      logger.main.log(`Liked tweet: ${content}`)\n    }\n    else {\n      throw new Error('Tweet ID is empty. Please provide a tweet ID to like.')\n    }\n  }\n\n  private async handleRetweet(content: string): Promise<void> {\n    if (content) {\n      await this.twitterServices.tweet.retweet(content)\n      logger.main.log(`Retweeted: ${content}`)\n    }\n    else {\n      throw new Error('Tweet ID is empty. Please provide a tweet ID to retweet.')\n    }\n  }\n\n  private async handleGetUser(content: string): Promise<boolean> {\n    if (content) {\n      const userProfile = await this.twitterServices.user.getUserProfile(content)\n      logger.main.log(`Retrieved profile for user: @${content}`)\n      // Return user info to the user\n      this.client.send({\n        type: 'input:text',\n        data: {\n          text: `User Profile for @${userProfile.username}:\nDisplay Name: ${userProfile.displayName}\nBio: ${userProfile.bio || 'N/A'}\nFollowers: ${userProfile.followersCount || 0}\nFollowing: ${userProfile.followingCount || 0}`,\n        },\n      })","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/moeru-ai/airi/blob/27111382b4a79a7e983289d6e983a06af185ed0f/integrations/twitter-services/src/adapters/airi-adapter.ts#L160-L196","documentation":"Thrown by handleRetweet when the parsed command's content is falsy — i.e. 'retweet:' was sent with no tweet id. This is a plain Error raised before retweet() is invoked, so no browser action runs.","triggerScenarios":"User sends 'retweet:' with nothing after the colon; parseTwitterCommand matched the 'retweet' prefix but content is empty/whitespace.","commonSituations":"User forgot to paste the tweet id/status URL; LLM truncated the payload; empty input forwarded by the AIRI input:text event.","solutions":["Provide a non-empty tweet id (or status URL) after 'retweet:'.","Validate content in the parser and reprompt for the id before dispatch.","Have the adapter reply with usage guidance instead of throwing."],"exampleFix":"// before\nif (content) { await this.twitterServices.tweet.retweet(content) } else {\n  throw new Error('Tweet ID is empty. Please provide a tweet ID to retweet.')\n}\n\n// after\nconst id = content?.trim()\nif (!id) {\n  this.client.send({ type: 'input:text', data: { text: 'Usage: retweet: <tweetId>' } })\n  return\n}","handlingStrategy":"validation","validationCode":"const id = (content ?? '').trim()\nif (!id) {\n  throw new Error('Tweet ID required')\n}\nawait adapter.handleRetweet(id)","typeGuard":"function isEmptyRetweetIdError(e: unknown): boolean {\n  return e instanceof Error && /tweet ID to retweet/i.test(e.message)\n}","tryCatchPattern":"try {\n  await this.handleRetweet(content)\n} catch (e) {\n  if (e instanceof Error && /tweet ID to retweet/i.test(e.message)) {\n    this.client.send({ type: 'input:text', data: { text: 'Usage: retweet: <tweetId>' } })\n  } else throw e\n}","preventionTips":["Validate parsed content for the 'retweet' command before dispatch.","Always include the tweet id or status URL after the prefix.","Reply with usage hints instead of throwing on empty input."],"tags":["twitter","validation","retweet","adapter","empty-input"],"backgroundTag":null,"analyzedSha":"27111382b4a79a7e983289d6e983a06af185ed0f","analyzedAt":"2026-08-12T18:33:34.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}