{"record":{"id":"f1e42be4686ad244","repo":"mem0ai/mem0","slug":"failed-to-list-vectors-error-instanceof-error","errorCode":null,"errorMessage":"Failed to list vectors: ${error instanceof Error ? error.message : String(error)}","messagePattern":"Failed to list vectors: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/vector_stores/vectorize.ts","lineNumber":247,"sourceCode":"          account_id: this.accountId,\n          vector: Array(this.dimensions).fill(0), // Dummy vector for listing\n          filter: filters,\n          topK: topK,\n          returnMetadata: \"all\",\n        },\n      );\n\n      const matches =\n        (result?.matches?.map((match) => ({\n          id: match.id,\n          payload: match.metadata,\n          score: match.score,\n        })) as VectorStoreResult[]) || [];\n\n      return [matches, matches.length];\n    } catch (error) {\n      console.error(\"Error listing vectors:\", error);\n      throw new Error(\n        `Failed to list vectors: ${error instanceof Error ? error.message : String(error)}`,\n      );\n    }\n  }\n\n  private generateUUID(): string {\n    return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(\n      /[xy]/g,\n      function (c) {\n        const r = (Math.random() * 16) | 0;\n        const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n        return v.toString(16);\n      },\n    );\n  }\n\n  async getUserId(): Promise<string> {\n    await this.initialize();","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/vectorize.ts#L229-L265","documentation":"Error \"Failed to list vectors: ${error instanceof Error ? error.message : String(error)}\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at mem0-ts/src/oss/src/vector_stores/vectorize.ts:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify your Cloudflare account ID and API token have Vectorize read permissions.","Check that the index exists and the cursor/filters passed to list are valid.","Retry transient network failures with backoff."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}