Skip to content

Commit

Permalink
Log paraswap status code (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkgnosis authored Apr 21, 2022
1 parent ebe7856 commit 1738304
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/shared/src/paraswap_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ impl ParaswapApi for DefaultParaswapApi {
async fn price(&self, query: PriceQuery) -> Result<PriceResponse, ParaswapResponseError> {
let url = query.into_url(&self.partner);
tracing::debug!("Querying Paraswap price API: {}", url);
let response_text = self.client.get(url).send().await?.text().await?;
tracing::debug!("Response from Paraswap price API: {}", response_text);
parse_paraswap_response_text(&response_text)
let response = self.client.get(url).send().await?;
let status = response.status();
let text = response.text().await?;
tracing::debug!(%status, %text, "Response from Paraswap price API");
parse_paraswap_response_text(&text)
}
async fn transaction(
&self,
Expand Down

0 comments on commit 1738304

Please sign in to comment.