From c23e58b91ac96bf0923aa932c8cad6600c83e422 Mon Sep 17 00:00:00 2001 From: Pedro Mantica Date: Thu, 12 Dec 2024 19:50:17 +0000 Subject: [PATCH] Fix getValidity proof --- src/api/method/get_validity_proof.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/method/get_validity_proof.rs b/src/api/method/get_validity_proof.rs index aeb4fe4f..356ae6f0 100644 --- a/src/api/method/get_validity_proof.rs +++ b/src/api/method/get_validity_proof.rs @@ -273,12 +273,12 @@ pub async fn get_validity_proof( && request.newAddresses.is_empty() && request.newAddressesWithTrees.is_empty() { - return Err(PhotonApiError::UnexpectedError( + return Err(PhotonApiError::ValidationError( "No hashes or new addresses provided for proof generation".to_string(), )); } if !request.newAddressesWithTrees.is_empty() && !request.newAddresses.is_empty() { - return Err(PhotonApiError::UnexpectedError( + return Err(PhotonApiError::ValidationError( "Cannot provide both newAddresses and newAddressesWithTree".to_string(), )); }