From e376cb0bf2d668971bfdd0cfc8bfbe8029cd5f41 Mon Sep 17 00:00:00 2001 From: Evgeny Fomin Date: Tue, 29 Oct 2024 18:59:00 +0100 Subject: [PATCH] fix missing error variant --- .../v0/mod.rs | 6 +++--- .../apply_contract_with_serialization/v0/mod.rs | 2 +- .../contract/get_fetch/fetch_contract/v0/mod.rs | 16 ++++++++-------- .../get_epoch_fee_multiplier/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../get_epochs_proposer_block_count/v0/mod.rs | 2 +- .../is_epochs_proposers_tree_empty/v0/mod.rs | 2 +- .../drive/credit_pools/epochs/start_block/mod.rs | 2 +- .../start_time/get_epoch_start_time/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../get_unpaid_epoch_index/v0/mod.rs | 2 +- .../src/drive/system/genesis_time/mod.rs | 2 +- ...ted_resource_votes_given_by_identity_query.rs | 4 ++-- .../src/query/drive_contested_document_query.rs | 2 +- packages/rs-drive/src/query/mod.rs | 10 ++++------ .../query/vote_poll_contestant_votes_query.rs | 4 ++-- .../src/query/vote_poll_vote_state_query.rs | 2 +- .../query/vote_polls_by_document_type_query.rs | 2 +- .../src/query/vote_polls_by_end_date_query.rs | 10 +++++----- .../batch_delete_items_in_path_query/v0/mod.rs | 2 +- .../grove_operations/grove_has_raw/v0/mod.rs | 2 +- 21 files changed, 39 insertions(+), 41 deletions(-) diff --git a/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_distribute_fees_from_oldest_unpaid_epoch_pool_to_proposers_operations/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_distribute_fees_from_oldest_unpaid_epoch_pool_to_proposers_operations/v0/mod.rs index 47f1f408728..b309417ef02 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_distribute_fees_from_oldest_unpaid_epoch_pool_to_proposers_operations/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/fee_pool_outwards_distribution/add_distribute_fees_from_oldest_unpaid_epoch_pool_to_proposers_operations/v0/mod.rs @@ -268,9 +268,9 @@ mod tests { assert!(matches!( result, - Err(DriveError::GroveDB( - grovedb::Error::PathParentLayerNotFound(_) - )) + Err(DriveError::GroveDB(grovedb::Error::InvalidParentLayerPath( + _ + ))) )); } } diff --git a/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs b/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs index 816b660e324..23e7f25a7f0 100644 --- a/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs @@ -169,7 +169,7 @@ impl Drive { } Err(Error::GroveDB(grovedb::Error::PathKeyNotFound(_))) | Err(Error::GroveDB(grovedb::Error::PathNotFound(_))) - | Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) => { + | Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) => { // keep already_exists at false } Err(e) => { diff --git a/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs b/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs index fa3a6fa1a88..ecfb9019681 100644 --- a/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs @@ -77,7 +77,7 @@ impl Drive { match value { Ok(Element::Item(stored_contract_bytes, element_flag)) => { let contract = cost_return_on_error_no_add!( - &cost, + cost, DataContract::versioned_deserialize( &stored_contract_bytes, false, @@ -88,7 +88,7 @@ impl Drive { let drive_operation = CalculatedCostOperation(cost.clone()); let fee = if let Some(epoch) = epoch { Some(cost_return_on_error_no_add!( - &cost, + cost, Drive::calculate_fee( None, Some(vec![drive_operation]), @@ -103,7 +103,7 @@ impl Drive { }; let storage_flags = cost_return_on_error_no_add!( - &cost, + cost, StorageFlags::map_some_element_flags_ref(&element_flag) .map_err(Error::StorageFlags) ); @@ -134,7 +134,7 @@ impl Drive { match value { Ok(Element::Item(stored_contract_bytes, element_flag)) => { let contract = cost_return_on_error_no_add!( - &cost, + cost, DataContract::versioned_deserialize( &stored_contract_bytes, false, @@ -145,7 +145,7 @@ impl Drive { let drive_operation = CalculatedCostOperation(cost.clone()); let fee = if let Some(epoch) = epoch { Some(cost_return_on_error_no_add!( - &cost, + cost, Drive::calculate_fee( None, Some(vec![drive_operation]), @@ -160,7 +160,7 @@ impl Drive { }; let storage_flags = cost_return_on_error_no_add!( - &cost, + cost, StorageFlags::map_some_element_flags_ref(&element_flag) .map_err(Error::StorageFlags) ); @@ -180,7 +180,7 @@ impl Drive { .wrap_with_cost(cost), Err( grovedb::Error::PathKeyNotFound(_) - | grovedb::Error::PathParentLayerNotFound(_) + | grovedb::Error::InvalidParentLayerPath(_) | grovedb::Error::PathNotFound(_), ) => Ok(None).wrap_with_cost(cost), Err(e) => Err(Error::GroveDB(e)).wrap_with_cost(cost), @@ -192,7 +192,7 @@ impl Drive { .wrap_with_cost(cost), Err( grovedb::Error::PathKeyNotFound(_) - | grovedb::Error::PathParentLayerNotFound(_) + | grovedb::Error::InvalidParentLayerPath(_) | grovedb::Error::PathNotFound(_), ) => Ok(None).wrap_with_cost(cost), Err(e) => Err(Error::GroveDB(e)).wrap_with_cost(cost), diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_fee_multiplier/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_fee_multiplier/v0/mod.rs index 46984456fa6..f8e5757856e 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_fee_multiplier/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_fee_multiplier/v0/mod.rs @@ -71,7 +71,7 @@ mod tests { assert!(matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) )); } diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_storage_credits_for_distribution/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_storage_credits_for_distribution/v0/mod.rs index c12720a8b64..91573381e0b 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_storage_credits_for_distribution/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/credit_distribution_pools/get_epoch_storage_credits_for_distribution/v0/mod.rs @@ -68,7 +68,7 @@ mod tests { assert!(matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) )); } diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epochs_proposer_block_count/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epochs_proposer_block_count/v0/mod.rs index 8475308ffd7..7c96052f7c0 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epochs_proposer_block_count/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/get_epochs_proposer_block_count/v0/mod.rs @@ -117,7 +117,7 @@ mod tests { assert!(matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) )); } } diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/is_epochs_proposers_tree_empty/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/is_epochs_proposers_tree_empty/v0/mod.rs index 00b7f07742c..af2fec1cc67 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/proposers/is_epochs_proposers_tree_empty/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/proposers/is_epochs_proposers_tree_empty/v0/mod.rs @@ -25,7 +25,7 @@ impl Drive { .unwrap() { Ok(result) => Ok(result), - Err(grovedb::Error::PathNotFound(_) | grovedb::Error::PathParentLayerNotFound(_)) => { + Err(grovedb::Error::PathNotFound(_) | grovedb::Error::InvalidParentLayerPath(_)) => { Ok(true) } Err(_) => Err(Error::Drive(DriveError::CorruptedCodeExecution( diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/start_block/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/start_block/mod.rs index 2788fd9ff28..47c46824b8c 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/start_block/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/start_block/mod.rs @@ -58,7 +58,7 @@ mod tests { assert!(matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) )); } diff --git a/packages/rs-drive/src/drive/credit_pools/epochs/start_time/get_epoch_start_time/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/epochs/start_time/get_epoch_start_time/v0/mod.rs index 390a878b74e..8ffb3bf9312 100644 --- a/packages/rs-drive/src/drive/credit_pools/epochs/start_time/get_epoch_start_time/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/epochs/start_time/get_epoch_start_time/v0/mod.rs @@ -71,7 +71,7 @@ mod tests { assert!(matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) )); } diff --git a/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs index ee90eec06c4..d427b8be11c 100644 --- a/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs @@ -62,7 +62,7 @@ mod tests { assert!(matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) )); } diff --git a/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs index bcfdaf59b1b..6b77c248f97 100644 --- a/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs @@ -64,7 +64,7 @@ mod tests { assert!(matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) )); } diff --git a/packages/rs-drive/src/drive/system/genesis_time/mod.rs b/packages/rs-drive/src/drive/system/genesis_time/mod.rs index 9eee51529b7..9c87c851c83 100644 --- a/packages/rs-drive/src/drive/system/genesis_time/mod.rs +++ b/packages/rs-drive/src/drive/system/genesis_time/mod.rs @@ -35,7 +35,7 @@ impl Drive { Ok(Some(genesis_time_ms)) } Err(Error::GroveDB( - grovedb::Error::PathParentLayerNotFound(_) | grovedb::Error::PathKeyNotFound(_), + grovedb::Error::InvalidParentLayerPath(_) | grovedb::Error::PathKeyNotFound(_), )) => Ok(None), Err(e) => Err(e), } diff --git a/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs b/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs index b5b6938358d..aa144739d74 100644 --- a/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs +++ b/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs @@ -144,7 +144,7 @@ impl ContestedResourceVotesGivenByIdentityQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(BTreeMap::new()), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok(BTreeMap::new()), Err(e) => Err(e), Ok((query_result_elements, _)) => { let voters = @@ -209,7 +209,7 @@ impl ContestedResourceVotesGivenByIdentityQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => { + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => { Ok((QueryResultElements::new(), 0)) } _ => { diff --git a/packages/rs-drive/src/query/drive_contested_document_query.rs b/packages/rs-drive/src/query/drive_contested_document_query.rs index e83950d6e0d..bae36552f7f 100644 --- a/packages/rs-drive/src/query/drive_contested_document_query.rs +++ b/packages/rs-drive/src/query/drive_contested_document_query.rs @@ -148,7 +148,7 @@ impl<'a> DriveContestedDocumentQuery<'a> { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok((Vec::new(), 0)), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok((Vec::new(), 0)), _ => { let (data, skipped) = query_result?; { diff --git a/packages/rs-drive/src/query/mod.rs b/packages/rs-drive/src/query/mod.rs index 7491454a647..d75be4c360d 100644 --- a/packages/rs-drive/src/query/mod.rs +++ b/packages/rs-drive/src/query/mod.rs @@ -915,7 +915,7 @@ impl<'a> DriveDocumentQuery<'a> { .map_err(|e| match e { Error::GroveDB(GroveError::PathKeyNotFound(_)) | Error::GroveDB(GroveError::PathNotFound(_)) - | Error::GroveDB(GroveError::PathParentLayerNotFound(_)) => { + | Error::GroveDB(GroveError::InvalidParentLayerPath(_)) => { let error_message = if self.start_at_included { "startAt document not found" } else { @@ -1875,7 +1875,7 @@ impl<'a> DriveDocumentQuery<'a> { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok((Vec::new(), 0)), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok((Vec::new(), 0)), _ => { let (data, skipped) = query_result?; { @@ -1912,7 +1912,7 @@ impl<'a> DriveDocumentQuery<'a> { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => { + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => { Ok((QueryResultElements::new(), 0)) } _ => { @@ -2014,9 +2014,7 @@ mod tests { use serde_json::Value::Null; use crate::config::DriveConfig; - use crate::util::test_helpers::setup::{ - setup_drive_with_initial_state_structure, setup_system_data_contract, - }; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; use dpp::block::block_info::BlockInfo; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contracts::SystemDataContract; diff --git a/packages/rs-drive/src/query/vote_poll_contestant_votes_query.rs b/packages/rs-drive/src/query/vote_poll_contestant_votes_query.rs index f170d6820dc..83d9d2c4919 100644 --- a/packages/rs-drive/src/query/vote_poll_contestant_votes_query.rs +++ b/packages/rs-drive/src/query/vote_poll_contestant_votes_query.rs @@ -215,7 +215,7 @@ impl ContestedDocumentVotePollVotesDriveQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(vec![]), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok(vec![]), Err(e) => Err(e), Ok((query_result_elements, _skipped)) => { let voters = query_result_elements @@ -252,7 +252,7 @@ impl ContestedDocumentVotePollVotesDriveQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => { + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => { Ok((QueryResultElements::new(), 0)) } _ => { diff --git a/packages/rs-drive/src/query/vote_poll_vote_state_query.rs b/packages/rs-drive/src/query/vote_poll_vote_state_query.rs index b1fa7413a13..d283da3d683 100644 --- a/packages/rs-drive/src/query/vote_poll_vote_state_query.rs +++ b/packages/rs-drive/src/query/vote_poll_vote_state_query.rs @@ -532,7 +532,7 @@ impl<'a> ResolvedContestedDocumentVotePollDriveQuery<'a> { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => { + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => { Ok(ContestedDocumentVotePollDriveQueryExecutionResult::default()) } Err(e) => Err(e), diff --git a/packages/rs-drive/src/query/vote_polls_by_document_type_query.rs b/packages/rs-drive/src/query/vote_polls_by_document_type_query.rs index f85b882c0a6..26cf5ce9878 100644 --- a/packages/rs-drive/src/query/vote_polls_by_document_type_query.rs +++ b/packages/rs-drive/src/query/vote_polls_by_document_type_query.rs @@ -479,7 +479,7 @@ impl<'a> ResolvedVotePollsByDocumentTypeQuery<'a> { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(vec![]), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok(vec![]), Err(e) => Err(e), Ok((query_result_elements, _)) => { let result_is_in_key = self.result_is_in_key(); diff --git a/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs b/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs index fb34e8a619d..8ff2c16ca08 100644 --- a/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs +++ b/packages/rs-drive/src/query/vote_polls_by_end_date_query.rs @@ -118,7 +118,7 @@ impl VotePollsByEndDateDriveQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(BTreeMap::new()), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok(BTreeMap::new()), Err(e) => Err(e), Ok((query_result_elements, _)) => { let vote_polls_by_end_date = query_result_elements @@ -174,7 +174,7 @@ impl VotePollsByEndDateDriveQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(vec![]), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok(vec![]), Err(e) => Err(e), Ok((query_result_elements, _)) => { // Process the query result elements and collect VotePolls @@ -348,7 +348,7 @@ impl VotePollsByEndDateDriveQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(BTreeMap::new()), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok(BTreeMap::new()), Err(e) => Err(e), Ok((query_result_elements, _)) => { let vote_polls_by_end_date = query_result_elements @@ -402,7 +402,7 @@ impl VotePollsByEndDateDriveQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => Ok(BTreeMap::new()), + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => Ok(BTreeMap::new()), Err(e) => Err(e), Ok((query_result_elements, _)) => { let vote_polls_by_end_date = query_result_elements @@ -456,7 +456,7 @@ impl VotePollsByEndDateDriveQuery { match query_result { Err(Error::GroveDB(GroveError::PathKeyNotFound(_))) | Err(Error::GroveDB(GroveError::PathNotFound(_))) - | Err(Error::GroveDB(GroveError::PathParentLayerNotFound(_))) => { + | Err(Error::GroveDB(GroveError::InvalidParentLayerPath(_))) => { Ok(QueryResultElements::new()) } _ => { diff --git a/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs index a530776986d..4e182492690 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs @@ -484,7 +484,7 @@ mod tests { // Assert failure due to missing intermediate path assert_matches!( result, - Err(Error::GroveDB(grovedb::Error::PathParentLayerNotFound(_))) + Err(Error::GroveDB(grovedb::Error::InvalidParentLayerPath(_))) ); } diff --git a/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs index 52b3eaaa969..a560d54b798 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs @@ -67,7 +67,7 @@ impl Drive { .map(|r| match r { Err(GroveError::PathKeyNotFound(_)) | Err(GroveError::PathNotFound(_)) - | Err(GroveError::PathParentLayerNotFound(_)) => Ok(false), + | Err(GroveError::InvalidParentLayerPath(_)) => Ok(false), Err(e) => Err(e), Ok(_) => Ok(true), })