From d4e2be0758284b87c61282c400404bdc29ce947e Mon Sep 17 00:00:00 2001 From: "Max Kalashnikoff | maksy.eth" Date: Fri, 18 Oct 2024 22:56:38 +0200 Subject: [PATCH] fix(WalletService): fixing HTTP 400 error when internal expected (#813) --- src/handlers/wallet/handler.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/handlers/wallet/handler.rs b/src/handlers/wallet/handler.rs index a3cea238..bea8295a 100644 --- a/src/handlers/wallet/handler.rs +++ b/src/handlers/wallet/handler.rs @@ -58,7 +58,13 @@ async fn handler_internal( ))) .into_response(), Err(e) => { - let is_internal = matches!(e, Error::Internal(_)); + let is_internal = matches!(e, Error::Internal(_)) + || matches!( + e, + Error::SendPreparedCalls(SendPreparedCallsError::InternalError(_)) + ) + || matches!(e, Error::PrepareCalls(PrepareCallsError::InternalError(_))); + if is_internal { error!("Internal server error handling wallet RPC request: {e:?}"); }