{"record":{"id":"3032cc3d9e38858b","repo":"diegosouzapw/OmniRoute","slug":"invalid-machine-id-format-expected-uuid-format","errorCode":null,"errorMessage":"Invalid machine ID format. Expected UUID format.","messagePattern":"Invalid machine ID format\\. Expected UUID format\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/oauth/services/cursor.ts","lineNumber":115,"sourceCode":"   * @param {string} accessToken - Access token from state.vscdb or auth.json\n   * @param {string} [machineId] - Machine ID from state.vscdb (optional for cursor-agent imports)\n   */\n  async validateImportToken(accessToken: string, machineId?: string) {\n    // Basic validation\n    if (!accessToken || typeof accessToken !== \"string\") {\n      throw new Error(\"Access token is required\");\n    }\n\n    // Token format validation (Cursor tokens are typically long strings)\n    if (accessToken.length < 50) {\n      throw new Error(\"Invalid token format. Token appears too short.\");\n    }\n\n    // Machine ID format validation (only if provided — cursor-agent imports don't have one)\n    if (machineId) {\n      const uuidRegex = /^[a-f0-9-]{32,}$/i;\n      if (!uuidRegex.test(machineId.replace(/-/g, \"\"))) {\n        throw new Error(\"Invalid machine ID format. Expected UUID format.\");\n      }\n    }\n\n    // Note: We don't validate against API because Cursor uses complex protobuf.\n    // Token will be validated when used for actual requests.\n\n    return {\n      accessToken,\n      machineId: machineId || null,\n      expiresIn: 86400, // Cursor tokens typically last 24 hours\n      authMethod: machineId ? \"imported\" : \"cursor-agent\",\n    };\n  }\n\n  /**\n   * Extract user info from token if possible\n   * Cursor tokens may contain encoded user info\n   */","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/services/cursor.ts#L97-L133","documentation":"Error \"Invalid machine ID format. Expected UUID format.\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/services/cursor.ts:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}