{"record":{"id":"b8a1cc49cede6f1b","repo":"mem0ai/mem0","slug":"databricks-endpoint-status-did-not-report-a-state","errorCode":null,"errorMessage":"Databricks endpoint status did not report a state during initialization.","messagePattern":"Databricks endpoint status did not report a state during initialization\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/vector_stores/databricks.ts","lineNumber":1219,"sourceCode":"    }\n  }\n\n  private async waitForEndpointReadiness(): Promise<void> {\n    const deadline = Date.now() + this.syncTimeoutMs;\n\n    while (Date.now() <= deadline) {\n      const response = await this.httpClient.get(\n        `/endpoints/${encodeURIComponent(this.endpointName)}`,\n      );\n      const state =\n        response?.data?.endpoint_status?.state ?? response?.data?.state;\n\n      if (state === \"ONLINE\") {\n        return;\n      }\n\n      if (typeof state !== \"string\") {\n        throw new Error(\n          \"Databricks endpoint status did not report a state during initialization.\",\n        );\n      }\n\n      if (this.syncPollIntervalMs > 0) {\n        await new Promise((resolve) =>\n          setTimeout(resolve, this.syncPollIntervalMs),\n        );\n      }\n    }\n\n    throw new Error(\n      `Timed out waiting for Databricks endpoint ${this.endpointName} to become ready.`,\n    );\n  }\n\n  private async waitForIndexReadiness(): Promise<void> {\n    const deadline = Date.now() + this.syncTimeoutMs;","sourceCodeStart":1201,"sourceCodeEnd":1237,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/databricks.ts#L1201-L1237","documentation":"During initialization the store polls GET /endpoints/{name} until state is ONLINE. The state is read from endpoint_status.state or a top-level state. If the response shape is unrecognized — state is not a string — the store cannot distinguish provisioning from failure and throws rather than looping blindly.","triggerScenarios":"The Vector Search API returns an unexpected payload: 200 with an error envelope, a truncated body, a proxy/SSO HTML page, or an API version whose response omits endpoint_status.state — during the initial wait for the endpoint to come online.","commonSituations":"Endpoint name typo so the GET returns a not-found envelope with no state; workspace where Vector Search is disabled; a gateway rewriting responses; the endpoint being deleted while initialize() polls.","solutions":["Verify endpointName matches an existing Vector Search endpoint in the workspace UI","Confirm Vector Search is enabled for the workspace/region","Inspect the raw GET /api/2.0/vector-search/endpoints/{name} response to see what shape is actually returned (proxy interference, error envelope)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const resp = await httpClient.get(`/api/2.0/vector-search/endpoints/${encodeURIComponent(endpointName)}`);\nconst state = resp?.data?.endpoint_status?.state ?? resp?.data?.state;\nif (typeof state !== 'string') throw new Error('Unexpected endpoint status payload — check endpoint name and workspace');","typeGuard":null,"tryCatchPattern":"try { await store.initialize(); } catch (e) { if (e instanceof Error && e.message.includes('did not report a state')) { /* verify endpointName exists and Vector Search is enabled, then retry */ } throw e; }","preventionTips":["Pre-create the Vector Search endpoint and confirm it appears in the workspace UI before app startup","Log the raw endpoint-status response when polling fails to identify proxies/API-shape issues"],"tags":["databricks","vector-search","initialization","api-contract"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}