{"record":{"id":"03385879fb5a52a4","repo":"continuedev/continue","slug":"failed-to-fetch-messages-response-statustext","errorCode":null,"errorMessage":"Failed to fetch messages: ${response.statusText}","messagePattern":"Failed to fetch messages: (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/context/providers/DiscordContextProvider.ts","lineNumber":64,"sourceCode":"  get deprecationMessage() {\n    return \"The Discord context provider is now deprecated and may be removed in a later version. Please consider using the Discord MCP (hub.docker.com/r/mcp/mcp-discord) instead.\";\n  }\n\n  async fetchMessages(\n    channelId: string,\n    fetch: FetchFunction,\n  ): Promise<Array<DiscordMessage>> {\n    const url = this.getUrl(`/channels/${channelId}/messages`);\n    // Fetch messages from the specified channel using the provided fetch function\n    const response = await fetch(url, {\n      headers: {\n        Authorization: `Bot ${this.options.discordKey}`,\n        \"Content-Type\": \"application/json\",\n      },\n    });\n\n    if (!response.ok) {\n      throw new Error(`Failed to fetch messages: ${response.statusText}`);\n    }\n\n    return response.json();\n  }\n\n  async fetchChannels(fetch: FetchFunction): Promise<Array<DiscordChannel>> {\n    const url = this.getUrl(`/guilds/${this.options.guildId}/channels`);\n    const response = await fetch(url, {\n      headers: {\n        Authorization: `Bot ${this.options.discordKey}`,\n        \"Content-Type\": \"application/json\",\n      },\n    });\n\n    if (!response.ok) {\n      throw new Error(`Failed to fetch channels: ${response.statusText}`);\n    }\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/context/providers/DiscordContextProvider.ts#L46-L82","documentation":"Non-2xx from the Vertex embeddings (predict) endpoint. The embeddings request is JSON-POSTed with auth headers; failure status/statusText is surfaced without the body.","triggerScenarios":"Embedding model name invalid for the project (e.g. textembedding model not enabled), auth token expired, wrong project/region, input batch exceeding token limits producing 400.","commonSituations":"Switching embedding models without enabling them in Vertex; batching too many/large inputs; expired ADC tokens in long-running workers.","solutions":["Verify the embedding model id and enable it in the project (e.g. text-embedding-004)","Reduce batch size / truncate inputs and retry","Refresh auth (re-run ADC login or use fresh keyJson); test the same request with curl","Add error handling that logs response body by re-issuing the request manually"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await api.embed(body); } catch (e) { const m = (e as Error).message; if (m.includes('429')) { body.input = chunk(body.input, Math.ceil(body.input.length / 2)); await retry(); } else throw e; }","preventionTips":["Enable embedding models in the project before use","Cap batch sizes and token counts per request","Refresh auth proactively in long-lived workers"],"tags":["vertexai","embeddings","http-error"],"backgroundTag":"upstream-api-http-error","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}