From 6f1d754114473faf61126b962537e60885455bc1 Mon Sep 17 00:00:00 2001 From: pmantica11 <151664502+pmantica11@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:50:40 -0500 Subject: [PATCH] Fix getValidity proof (#254) --- 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 aeb4fe4..356ae6f 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(), )); }