From 60ab58998d9aae026bb059fa59cd98b5feb14ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C5=9Fu?= Date: Wed, 9 Aug 2023 18:12:59 +0300 Subject: [PATCH] Print warning when coconut verif endpoint doesn't work (#3755) --- .../websocket/connection_handler/coconut.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs b/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs index cc8c552b07..e19f4a14fe 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs @@ -118,8 +118,15 @@ impl CoconutVerifier { revoke_fee.clone(), ) .await?; - if !ret?.verification_result { - debug!("Validator {} didn't accept the credential. It will probably vote No on the spending proposal", client.api_client.nym_api_client.current_url()); + match ret { + Ok(res) => { + if !res.verification_result { + debug!("Validator {} didn't accept the credential. It will probably vote No on the spending proposal", client.api_client.nym_api_client.current_url()); + } + } + Err(e) => { + warn!("Validator {} could not be reached. There might be a problem with the coconut endpoint - {:?}", client.api_client.nym_api_client.current_url(), e); + } } }