{"record":{"id":"05fb61d493a46eaf","repo":"mem0ai/mem0","slug":"neptune-analytics-https-endpoints-require-graphide","errorCode":null,"errorMessage":"Neptune Analytics HTTPS endpoints require graphIdentifier; pass graphIdentifier separately or use neptune-graph://<graph-id>.","messagePattern":"Neptune Analytics HTTPS endpoints require graphIdentifier; pass graphIdentifier separately or use neptune-graph://<graph-id>\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/vector_stores/neptune_analytics.ts","lineNumber":415,"sourceCode":"      );\n    }\n  }\n\n  private resolveGraphIdentifier(config: NeptuneAnalyticsConfig): string {\n    if (config.graphIdentifier) {\n      return config.graphIdentifier;\n    }\n\n    const rawIdentifier = config.endpoint;\n\n    if (!rawIdentifier) {\n      throw new Error(\n        \"Neptune Analytics vector store requires graphIdentifier or endpoint.\",\n      );\n    }\n\n    if (/^https?:\\/\\//i.test(rawIdentifier)) {\n      throw new Error(\n        \"Neptune Analytics HTTPS endpoints require graphIdentifier; pass graphIdentifier separately or use neptune-graph://<graph-id>.\",\n      );\n    }\n\n    if (rawIdentifier.startsWith(\"neptune-graph://\")) {\n      return rawIdentifier.slice(\"neptune-graph://\".length);\n    }\n\n    return rawIdentifier;\n  }\n\n  private buildClientConfig(config: NeptuneAnalyticsConfig): {\n    [key: string]: any;\n    endpoint?: string;\n  } {\n    const {\n      client: _client,\n      collectionName: _collectionName,","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/neptune_analytics.ts#L397-L433","documentation":"If config.endpoint is an http(s) URL, the Neptune Analytics provider refuses it: the SDK's vector-search API is addressed by graph identifier, not by the HTTPS endpoint URL (that pattern belongs to Neptune Database / the data API). The error tells you to pass graphIdentifier explicitly or use the neptune-graph://<graph-id> scheme. This prevents silently targeting the wrong service.","triggerScenarios":"config: { endpoint: 'https://g-1234abcd.us-east-1.neptune-graph.amazonaws.com' }; copying the console's endpoint URL from the Neptune Analytics graph details page into endpoint; reusing Neptune Database host:port-style config from an older setup.","commonSituations":"AWS console copy-paste; migrating from neptune-db (Gremlin/SPARQL endpoint at :8182) to Neptune Analytics; config templating that always emits full URLs.","solutions":["Extract the graph id from the URL (g-xxxxxxxx) and pass graphIdentifier: 'g-xxxxxxxx'.","Or set endpoint: 'neptune-graph://g-xxxxxxxx'.","Keep a raw graph-id (no scheme) in config/env rather than the full HTTPS URL."],"exampleFix":"// before\nconfig: { endpoint: 'https://g-1234abcd.us-east-1.neptune-graph.amazonaws.com' } // throws\n\n// after\nconfig: { graphIdentifier: 'g-1234abcd', region: 'us-east-1' }","handlingStrategy":"validation","validationCode":"if (/^https?:\\/\\//i.test(config.endpoint ?? '')) {\n  config = { ...config, graphIdentifier: config.endpoint.match(/(g-[a-z0-9]+)/i)?.[1] };\n  if (!config.graphIdentifier) throw new Error('Could not extract graph id from endpoint URL');\n}","typeGuard":"const isRawGraphId = (s: string): boolean =>\n  /^(neptune-graph:\\/\\/)?g-[a-z0-9]+$/i.test(s);","tryCatchPattern":"try { store = new NeptuneAnalytics(config); }\ncatch (e) {\n  if (e instanceof Error && e.message.includes('HTTPS endpoints require graphIdentifier')) {\n    const id = config.endpoint.match(/(g-[a-z0-9]+)/i)?.[1];\n    if (id) store = new NeptuneAnalytics({ ...config, graphIdentifier: id, endpoint: undefined });\n    else throw e;\n  } else throw e;\n}","preventionTips":["Keep only the graph id (g-xxxx) in config/env, never the full HTTPS URL.","Add a config lint test asserting endpoint doesn't start with http(s):// for neptune-analytics.","Remember: Neptune Analytics is addressed by graph id; Neptune Database is the URL+port one."],"tags":["neptune","aws","config","endpoint","vector-store"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}