continuedev/continue · error · Error
Error in BedrockReranker.rerank: ${error.message}
Error message
Error in BedrockReranker.rerank: ${error.message} What it means
Generic wrapper thrown by BedrockReranker.rerank for any non-AWS-coded Error that escapes the rerank HTTP call — network faults, JSON parse failures, or unexpected response shapes. Only the message string is preserved, so the AWS code is lost.
Source
Thrown at packages/openai-adapters/src/apis/Bedrock.ts:708
.sort((a: any, b: any) => a.index - b.index)
.map((result: any) => result.relevance_score);
return rerank({
model: body.model,
usage: {
total_tokens: 0,
},
data: scores,
});
} catch (error) {
if (error instanceof Error) {
if ("code" in error) {
// AWS SDK specific errors
throw new Error(
`AWS Bedrock rerank error (${(error as any).code}): ${error.message}`,
);
}
throw new Error(`Error in BedrockReranker.rerank: ${error.message}`);
}
throw new Error(
"Error in BedrockReranker.rerank: Unknown error occurred",
);
}
}
list(): Promise<Model[]> {
throw new Error("Method not implemented.");
}
}
View on GitHub (pinned to 5522c6f44c)
Solutions
- Inspect error.message for the underlying cause; retry on transient network messages.
- Verify network/proxy configuration for AWS endpoints.
- Pin or update @aws-sdk/client-bedrock-agent-runtime if the response shape changed.
Defensive patterns
Strategy: try-catch
Try / catch
try { await bedrock.rerank(body); } catch (e) { log.error('bedrock rerank failed', e instanceof Error ? e.message : e); await fallbackRerank(body); } Prevention
- Wrap rerank calls with a fallback (skip reranking or use another provider).
- Log full error details to distinguish network vs AWS errors.
When it happens
Trigger: DNS/TLS failure reaching bedrock-agent-runtime, proxy interference, truncated response body failing JSON.parse, or SDK throwing a plain Error without a code property.
Common situations: Corporate proxies breaking SDK requests; transient network drops; response schema drift after an SDK upgrade.
Related errors
- Error in BedrockReranker.rerank: ${error.message}
- Failed to fetch Ollama library: ${response.status}
- Failed to fetch OpenRouter models: ${response.status}
- Failed to fetch Anthropic models: ${response.status}
- Failed to fetch Gemini models: ${response.status}
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/601fbe3ed6655d95.
Report an issue: GitHub.