diff --git a/web3_proxy/src/frontend/admin.rs b/web3_proxy/src/frontend/admin.rs index d64241e1..e2276d0d 100644 --- a/web3_proxy/src/frontend/admin.rs +++ b/web3_proxy/src/frontend/admin.rs @@ -134,7 +134,8 @@ pub async fn admin_increase_balance( .to_owned(), ) .exec(&db_conn) - .await?; + .await + .web3_context("admin is increasing balance")?; let response = (StatusCode::OK, Json(out)).into_response(); diff --git a/web3_proxy/src/frontend/authorization.rs b/web3_proxy/src/frontend/authorization.rs index 85e49404..e0fa5023 100644 --- a/web3_proxy/src/frontend/authorization.rs +++ b/web3_proxy/src/frontend/authorization.rs @@ -1227,7 +1227,8 @@ impl Web3ProxyApp { .to_owned(), ) .exec(&db_conn) - .await?; + .await + .web3_context("creating empty balance row for existing user")?; continue; } diff --git a/web3_proxy/src/frontend/users/payment.rs b/web3_proxy/src/frontend/users/payment.rs index 255baf26..37b14bff 100644 --- a/web3_proxy/src/frontend/users/payment.rs +++ b/web3_proxy/src/frontend/users/payment.rs @@ -1,5 +1,5 @@ use crate::app::Web3ProxyApp; -use crate::errors::{Web3ProxyError, Web3ProxyResponse, Web3ProxyResult}; +use crate::errors::{Web3ProxyError, Web3ProxyErrorContext, Web3ProxyResponse, Web3ProxyResult}; use crate::frontend::authorization::{ login_is_authorized, Authorization as Web3ProxyAuthorization, }; @@ -313,7 +313,8 @@ pub async fn user_balance_post( .to_owned(), ) .exec(&txn) - .await?; + .await + .web3_context("increasing balance")?; trace!("Saving log {} of txid {:?}", log_index, tx_hash); let receipt = increase_on_chain_balance_receipt::ActiveModel {