tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
11.57k stars 288 forks source link

Syncing function does not throw error when providing a non-existant remote database while using the Rust crate #439

Closed xinnks closed 1 year ago

xinnks commented 1 year ago

Reproduce

Use the remote_sync example code on libsql/crates/core/examples. Provide all the required variables, making sure the syncUrl is a non-existant database.

Current behaviour

No error is thrown highlighting this, the syncing seems to run successfully.

Expected behaviour

Maybe the sync function should throw an error?

LucioFranco commented 1 year ago

When I connect to an not valid db url that is hosted on the turso platform I get this error

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ConnectionFailed("status: Unavailable, message: \"grpc-status header missing, mapped from HTTP status code 502\", details: [], metadata: MetadataMap { headers: {\"server\": \"Fly/e440b950 (2023-09-20)\", \"via\": \"1.1 fly.io\", \"fly-request-id\": \"01HBXNJ69F309NJARP33GZ2FQ1-lga\", \"content-length\": \"0\", \"date\": \"Wed, 04 Oct 2023 15:42:23 GMT\"} }")', core/examples/replica.rs:25:29
LucioFranco commented 1 year ago

https://github.com/chiselstrike/turso/pull/1034 should fix this