LanceDB version
0.30.1-beta.2 (from Cargo.toml)
What happened?
The Bedrock embedding compute path can panic instead of returning a typed error.
Exact cause
- Runtime-sensitive blocking path is used at bedrock.rs, then unwrapped.
- Request serialization uses unwrap at bedrock.rs.
- Response vector conversion unwraps numeric casting at bedrock.rs.
Expected behavior
Malformed payloads, non-numeric embedding values, or runtime incompatibility should return typed errors (for example Error::Runtime) and never panic.
Impact
- Panic can terminate request workers/process paths.
- Production reliability degrades under provider response drift.
- Error handling and observability are weaker than typed error propagation.
Are there known steps to reproduce?
- Configure Bedrock embedding provider and call embedding compute.
- Trigger one of:
- non-numeric values inside returned embedding array
- runtime setup incompatible with blocking path
- malformed/unexpected response shape
- Observe panic instead of graceful typed error.
Proposed improvement
- Replace panic-prone unwraps in Bedrock embedding flow with explicit
Result error mapping.
- Validate response schema and numeric element types before conversion.
- Remove/guard runtime blocking assumptions so incompatible runtime contexts return typed errors.
- Add tests for malformed JSON, non-numeric embeddings, and runtime mismatch to ensure no panic paths.
Acceptance criteria
- No panic for malformed/non-numeric Bedrock responses.
- Runtime incompatibility returns typed errors.
- Regression tests cover malformed JSON, non-numeric vectors, and runtime mismatch scenarios.
LanceDB version
0.30.1-beta.2(from Cargo.toml)What happened?
The Bedrock embedding compute path can panic instead of returning a typed error.
Exact cause
Expected behavior
Malformed payloads, non-numeric embedding values, or runtime incompatibility should return typed errors (for example
Error::Runtime) and never panic.Impact
Are there known steps to reproduce?
Proposed improvement
Resulterror mapping.Acceptance criteria