From 0528abdf97a891c18c1e9bf4a5421e51d663630d Mon Sep 17 00:00:00 2001 From: Ryan Green Date: Sun, 28 Apr 2024 11:33:05 -0230 Subject: [PATCH] fix: fix path on remote create_table and check for error response (#1244) --- rust/lancedb/src/remote/db.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/lancedb/src/remote/db.rs b/rust/lancedb/src/remote/db.rs index e45aca6a..9511475e 100644 --- a/rust/lancedb/src/remote/db.rs +++ b/rust/lancedb/src/remote/db.rs @@ -87,14 +87,16 @@ impl ConnectionInternal for RemoteDatabase { .await .unwrap()?; - self.client - .post(&format!("/v1/table/{}/create", options.name)) + let rsp = self + .client + .post(&format!("/v1/table/{}/create/", options.name)) .body(data_buffer) .header(CONTENT_TYPE, ARROW_STREAM_CONTENT_TYPE) // This is currently expected by LanceDb cloud but will be removed soon. .header("x-request-id", "na") .send() .await?; + self.client.check_response(rsp).await?; Ok(Table::new(Arc::new(RemoteTable::new( self.client.clone(),