{"record":{"id":"1ef4fc487b3fe50c","repo":"continuedev/continue","slug":"failed-to-sync-remote-config-http-response-stat","errorCode":null,"errorMessage":"Failed to sync remote config (HTTP ${response.status}): ${response.statusText}","messagePattern":"Failed to sync remote config \\(HTTP (.+?)\\): (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/continueServer/stubs/client.ts","lineNumber":42,"sourceCode":"\n  getUserToken(): string | undefined {\n    return this.userToken;\n  }\n\n  get connected(): boolean {\n    return this.url !== undefined && this.userToken !== undefined;\n  }\n\n  public async getConfig(): Promise<{ configJson: string }> {\n    const userToken = await this.userToken;\n    const response = await fetch(new URL(\"sync\", this.url).href, {\n      method: \"GET\",\n      headers: {\n        Authorization: `Bearer ${userToken}`,\n      },\n    });\n    if (!response.ok) {\n      throw new Error(\n        `Failed to sync remote config (HTTP ${response.status}): ${response.statusText}`,\n      );\n    }\n    const data = await response.json();\n    return data;\n  }\n\n  public async getFromIndexCache<T extends ArtifactType>(\n    keys: string[],\n    artifactId: T,\n    repoName: string | undefined,\n  ): Promise<EmbeddingsCacheResponse<T>> {\n    if (repoName === undefined) {\n      console.warn(\n        \"No repo name provided to getFromIndexCache, this may cause no results to be returned.\",\n      );\n    }\n","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/continueServer/stubs/client.ts#L24-L60","documentation":"The client stub for syncing remote config GETs the config endpoint with a Bearer userToken; on a non-OK response it throws with status and statusText. Auth failures (401), missing configs (404), or hub errors (5xx) all surface here.","triggerScenarios":"Calling getConfig with an invalid/expired userToken (401), a user/config id that no longer exists on the hub (404), or hub downtime (5xx).","commonSituations":"Stale token after re-login, token from a different environment (dev vs prod hub), config deleted on the hub side, or hub migration changing endpoints.","solutions":["Verify the token: decode the JWT and check exp; re-authenticate to get a fresh userToken","Confirm the config id/URL points at the correct hub environment","Retry on 5xx; check hub status if failures persist"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"function isLikelyValidToken(t: string): boolean {\n  try { const { exp } = JSON.parse(Buffer.from(t.split('.')[1], 'base64').toString()); return Date.now() / 1000 < exp; }\n  catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"try { return await getConfig(userToken); }\ncatch (e) {\n  if (/HTTP 401/.test(e.message)) { userToken = await reauthenticate(); return getConfig(userToken); }\n  if (/HTTP 5\\d\\d/.test(e.message)) { await backoff(); return getConfig(userToken); }\n  throw e;\n}","preventionTips":["Refresh tokens before expiry","Pin the correct hub environment per build","Retry with backoff on 5xx only"],"tags":["remote-config","auth","http","sync"],"backgroundTag":"http-401-unauthorized","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}