fix: fix path on remote create_table and check for error response (#1244)

This commit is contained in:
Ryan Green
2024-04-28 11:33:05 -02:30
committed by GitHub
parent 1090c311e8
commit 0528abdf97

View File

@@ -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(),