Skip to content

Commit 1f3b6f5

Browse files
committed
fix query_runs/id response parsing
1 parent 696c895 commit 1f3b6f5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/query.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ struct AsyncResponse {
2121

2222
#[derive(Deserialize)]
2323
struct QueryRunResponse {
24-
query_run_id: String,
24+
id: String,
2525
status: String,
2626
result_id: Option<String>,
27+
#[serde(default)]
2728
error: Option<String>,
2829
}
2930

@@ -131,8 +132,8 @@ pub fn poll(query_run_id: &str, workspace_id: &str, format: &str) {
131132
status => {
132133
use crossterm::style::Stylize;
133134
eprintln!("{}", format!("query status: {status}").yellow());
134-
eprintln!("query_run_id: {}", run.query_run_id);
135-
eprintln!("{}", format!("Poll again with: hotdata query {}", run.query_run_id).dark_grey());
135+
eprintln!("query_run_id: {}", run.id);
136+
eprintln!("{}", format!("Poll again with: hotdata query {}", run.id).dark_grey());
136137
}
137138
}
138139
}

0 commit comments

Comments
 (0)