Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions crates/antelope/src/api/v1/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ impl<T: Provider> ChainAPI<T> {
let message = format!("Failed to parse JSON: {}", e);
ClientError::encoding(message)
}),
Err(_) => Err(ClientError::encoding("Request failed".into())),
Err(error) => Err(ClientError::encoding(format!(
"Request failed, reason: {}",
error
))),
}
}

Expand Down Expand Up @@ -297,7 +300,12 @@ impl<T: Provider> ChainAPI<T> {

let response = match result.await {
Ok(response) => response,
Err(_) => return Err(ClientError::NETWORK("Failed to get table rows".into())),
Err(error) => {
return Err(ClientError::NETWORK(format!(
"Failed to get table rows, reason: {}",
error
)))
}
};
let json: Value = serde_json::from_str(response.as_str()).unwrap();
let response_obj = JSONObject::new(json);
Expand Down