diff --git a/libsql/src/local/database.rs b/libsql/src/local/database.rs index c0f82c66dfc..79ccb4b90db 100644 --- a/libsql/src/local/database.rs +++ b/libsql/src/local/database.rs @@ -492,6 +492,21 @@ impl Database { } else { self.try_pull(&mut sync_ctx, &conn).await } + .or_else(|err| { + let Error::Sync(err) = err else { + return Err(err); + }; + + // Ideally, *err* wouldn't be type erased, we aren't doing dynamic typing. + let Some(SyncError::HttpDispatch(_)) = err.downcast_ref::() else { + return Err(Error::Sync(err)); + }; + + Ok(crate::database::Replicated { + frame_no: None, + frames_synced: 0, + }) + }) } #[cfg(feature = "sync")]