Skip to content

Commit 1f101aa

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 1f101aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,11 @@ 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(
302+
format!("Failed to get table rows, reason: {}", error).into(),
303+
))
304+
}
301305
};
302306
let json: Value = serde_json::from_str(response.as_str()).unwrap();
303307
let response_obj = JSONObject::new(json);

0 commit comments

Comments
 (0)