Skip to content

Commit c12b89f

Browse files
committed
Include more details in the error message returned by get_table_rows
It is useful when debugging applications using `antelope.rs` as a dependency to query Antelope nodes.
1 parent d701cd9 commit c12b89f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/antelope/src/api/v1/chain.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,12 @@ impl<T: Provider> ChainAPI<T> {
297297

298298
let response = match result.await {
299299
Ok(response) => response,
300-
Err(_) => return Err(ClientError::NETWORK("Failed to get table rows".into())),
300+
Err(error) => {
301+
return Err(ClientError::NETWORK(format!(
302+
"Failed to get table rows, reason: {}",
303+
error
304+
)))
305+
}
301306
};
302307
let json: Value = serde_json::from_str(response.as_str()).unwrap();
303308
let response_obj = JSONObject::new(json);

0 commit comments

Comments
 (0)