From d98480d108d6d5d4c12dbf101878253c1aa5c14c Mon Sep 17 00:00:00 2001 From: Mikhail Montsev Date: Thu, 25 Jul 2024 22:44:31 +0200 Subject: [PATCH] Change E_REJECTED to E_ARGUMENT in CheckIfDestructionIsAllowed safeguard (#1672) --- cloud/blockstore/libs/storage/service/service_actor_destroy.cpp | 2 +- cloud/blockstore/libs/storage/service/service_ut_destroy.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/blockstore/libs/storage/service/service_actor_destroy.cpp b/cloud/blockstore/libs/storage/service/service_actor_destroy.cpp index a89572340f5..1afb15b4aac 100644 --- a/cloud/blockstore/libs/storage/service/service_actor_destroy.cpp +++ b/cloud/blockstore/libs/storage/service/service_actor_destroy.cpp @@ -192,7 +192,7 @@ NProto::TError TDestroyVolumeActor::CheckIfDestructionIsAllowed() const ); if (!allowed) { return MakeError( - E_REJECTED, + E_ARGUMENT, TStringBuilder() << "DiskId: " << DiskId << ", only disks with specific id prefixes are allowed to be" << " deleted"); diff --git a/cloud/blockstore/libs/storage/service/service_ut_destroy.cpp b/cloud/blockstore/libs/storage/service/service_ut_destroy.cpp index 8d8828065cb..14567e80807 100644 --- a/cloud/blockstore/libs/storage/service/service_ut_destroy.cpp +++ b/cloud/blockstore/libs/storage/service/service_ut_destroy.cpp @@ -162,7 +162,7 @@ Y_UNIT_TEST_SUITE(TServiceDestroyTest) service.SendDestroyVolumeRequest("without_prefix"); { auto response = service.RecvDestroyVolumeResponse(); - UNIT_ASSERT_VALUES_EQUAL(E_REJECTED, response->GetStatus()); + UNIT_ASSERT_VALUES_EQUAL(E_ARGUMENT, response->GetStatus()); } service.SendDestroyVolumeRequest("with_prefix");