From 6cd272a8ad1724763f626860e008e0c87bbfee74 Mon Sep 17 00:00:00 2001 From: dferendo Date: Tue, 26 Mar 2024 16:36:47 +0900 Subject: [PATCH] add why the api request failed --- client/src/request.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/request.rs b/client/src/request.rs index 33716120..03fef476 100644 --- a/client/src/request.rs +++ b/client/src/request.rs @@ -320,7 +320,10 @@ impl SuccinctClient { Ok(response.request_id) } else { error!("Request failed!"); - Err(Error::msg("Failed to submit request to Succinct X API.")) + Err(Error::msg(format!( + "Failed to submit request to Succinct X API, error {:?}", + res.error_for_status()?.text().await? + ))) } }