mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-09 00:59:46 -04:00
44ef7f4cd3
# Description of Changes Replace `.unwrap()` with `.map_err(log_and_500)?` on the `get_database_by_identity()` call in the WebSocket subscribe handler (`crates/client-api/src/routes/subscribe.rs`). This was the only call site in the codebase using `.unwrap()` for this method — all four other call sites in `database.rs` already use `.map_err(log_and_500)?`. A transient database error during WebSocket connection setup would panic the server instead of returning an HTTP 500. Closes #4686 # API and ABI breaking changes None. # Expected complexity level and risk 1 — Single-token replacement matching the established pattern used everywhere else. # Testing - [ ] Verified the fix matches the error-handling pattern used at all other `get_database_by_identity` call sites - [ ] Confirmed `log_and_500` is already imported in the file
⚠️ Internal Crate ⚠️
This crate is intended for internal use only. It is not stable and may change without notice.