continuedev/continue · error · Error
Error in BedrockReranker.rerank: Unknown error occurred
Error message
Error in BedrockReranker.rerank: Unknown error occurred
What it means
Thrown when BedrockReranker.rerank catches a non-Error value (string throw, object rejection, symbol) from the AWS call. The original thrown value is discarded entirely, making this the least informative failure.
Source
Thrown at packages/openai-adapters/src/apis/Bedrock.ts:710
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
- Reproduce with logging around the SDK call to capture the raw rejected value (catch (e) { console.error(typeof e, e); }).
- If caused by test mocks, make them reject with new Error(...) instead of strings.
- Update or pin the AWS SDK version if middleware is the culprit.
Defensive patterns
Strategy: try-catch
Try / catch
catch (e) { if (!(e instanceof Error)) { log.raw('non-error rejection', e); throw new Error(String(e)); } } Prevention
- In tests, always reject with new Error(...) not strings.
- Log raw rejected values when this opaque error appears.
When it happens
Trigger: A promise rejection with a plain object/string — e.g. an interceptor, mock, or SDK bug rejecting with a non-Error; serialization failures inside SDK middleware.
Common situations: Unit tests mocking the SDK with `throw 'oops'` instead of an Error; SDK middleware rejections; memory/serialization issues producing odd rejections.
Related errors
- Error in BedrockReranker.rerank: Unknown error occurred
- Error processing Bedrock stream: Unknown error occurred
- AWS Bedrock rerank error (${(error as any).code}): ${error.m
- Error in BedrockReranker.rerank: ${error.message}
- Malformed JSON received from Bedrock: ${decoded}
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/c9d113d289c91865.
Report an issue: GitHub.