{"record":{"id":"cbd6a51bcd66fbc6","repo":"continuedev/continue","slug":"failed-to-fetch-channels-response-statustext","errorCode":null,"errorMessage":"Failed to fetch channels: ${response.statusText}","messagePattern":"Failed to fetch channels: (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"core/context/providers/DiscordContextProvider.ts","lineNumber":80,"sourceCode":"\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\n    const channels = await response.json();\n    // Filter channels to only include text channels (type 0)\n    return channels.filter((channel: DiscordChannel) => channel.type === 0);\n  }\n\n  async getContextItems(\n    query: string,\n    extras: ContextProviderExtras,\n  ): Promise<ContextItem[]> {\n    const channels = await this.fetchChannels(extras.fetch);\n\n    let channelId: string;\n    // Find the channel by ID or name in the query string. If not found, use the first channel\n    const selectedChannel = channels.find(\n      (channel) => channel.id === query || channel.name === query,\n    );","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/context/providers/DiscordContextProvider.ts#L62-L98","documentation":"The adapter intentionally does not implement reranking for Vertex AI — the method is a hard stub that always throws. Vertex AI has no rerank endpoint exposed through this adapter.","triggerScenarios":"Any call to rerank() on the VertexAI adapter, regardless of arguments.","commonSituations":"Generic provider-agnostic code that calls rerank on every configured provider; migrating a rerank pipeline from Cohere/Mistral to Vertex.","solutions":["Route rerank requests to a provider that supports them (Cohere, Mistral, Jina)","Conditionally skip rerank when the provider is vertexai in multi-provider setups","File a feature request if Vertex adds a rerank API"],"exampleFix":"// before\nawait vertexApi.rerank({ query, documents });\n\n// after\nif (provider !== 'vertexai') await api.rerank({ query, documents });\nelse await cohereApi.rerank({ query, documents });","handlingStrategy":"type-guard","validationCode":"const supportsRerank = (api: unknown): api is { rerank(b: RerankCreateParams): Promise<CreateRerankResponse> } => typeof (api as any)?.rerank === 'function' && !(api instanceof VertexAIApi);","typeGuard":"const canRerank = (provider: string): boolean => provider !== 'vertexai';","tryCatchPattern":"try { return await api.rerank(body); } catch (e) { if ((e as Error).message.includes('not supported by VertexAI')) return fallbackRerank(body); throw e; }","preventionTips":["Feature-detect capabilities per provider in multi-provider abstractions","Keep a secondary rerank provider configured"],"tags":["vertexai","rerank","not-implemented"],"backgroundTag":"feature-not-implemented","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}