diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp
index 057623a394b..e44aa27230b 100644
--- a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp
@@ -995,5 +995,160 @@ TEST_F(ReshardingCoordinatorServiceTest, SuccessfullyAbortReshardOperationImmedi
     coordinator->getCompletionFuture().wait();
 }
 
+TEST_F(ReshardingCoordinatorServiceTest, CoordinatorReturnsErrorCode) {
+    const std::vector<CoordinatorStateEnum> states = {CoordinatorStateEnum::kPreparingToDonate,
+                                                      CoordinatorStateEnum::kCloning,
+                                                      CoordinatorStateEnum::kAborting};
+
+    PauseDuringStateTransitions stateTransitionsGuard(controller(), states);
+
+    auto opCtx = operationContext();
+    auto coordinator = initializeAndGetCoordinator();
+
+    stateTransitionsGuard.wait(CoordinatorStateEnum::kPreparingToDonate);
+    stateTransitionsGuard.unset(CoordinatorStateEnum::kPreparingToDonate);
+    waitUntilCommittedCoordinatorDocReach(opCtx, CoordinatorStateEnum::kPreparingToDonate);
+
+    makeDonorsReadyToDonate(opCtx);
+
+    stateTransitionsGuard.wait(CoordinatorStateEnum::kCloning);
+    stateTransitionsGuard.unset(CoordinatorStateEnum::kCloning);
+    waitUntilCommittedCoordinatorDocReach(opCtx, CoordinatorStateEnum::kCloning);
+
+    // Make recipients return error
+    {
+        auto coordDoc = getCoordinatorDoc(opCtx);
+        ASSERT_NE(coordDoc.getMetrics()->getDocumentCopy()->getStart(), Date_t::min());
+        auto shards = coordDoc.getRecipientShards();
+        RecipientShardContext ctx;
+        ctx.setState(RecipientStateEnum::kError);
+        Status abortReasonStatus{ErrorCodes::SnapshotUnavailable, "test simulated error"};
+        resharding::emplaceTruncatedAbortReasonIfExists(ctx, abortReasonStatus);
+
+        for (auto& shard : shards) {
+            shard.setMutableState(ctx);
+        }
+
+        coordDoc.setRecipientShards(shards);
+        replaceCoordinatorDoc(opCtx, coordDoc);
+    }
+
+    stateTransitionsGuard.wait(CoordinatorStateEnum::kAborting);
+    stateTransitionsGuard.unset(CoordinatorStateEnum::kAborting);
+    waitUntilCommittedCoordinatorDocReach(opCtx, CoordinatorStateEnum::kAborting);
+
+    // Make recipients and donors transition to done
+    {
+        auto coordDoc = getCoordinatorDoc(opCtx);
+        auto recipientShards = coordDoc.getRecipientShards();
+
+        for (auto& shard : recipientShards) {
+            RecipientShardContext ctx;
+            ctx.setState(RecipientStateEnum::kDone);
+            shard.setMutableState(ctx);
+        }
+
+        coordDoc.setRecipientShards(recipientShards);
+
+        auto donorShards = coordDoc.getDonorShards();
+
+        for (auto& shard : donorShards) {
+            DonorShardContext ctx;
+            ctx.setState(DonorStateEnum::kDone);
+            shard.setMutableState(ctx);
+        }
+
+        coordDoc.setDonorShards(donorShards);
+        replaceCoordinatorDoc(opCtx, coordDoc);
+    }
+
+    ASSERT_THROWS_CODE(coordinator->getCompletionFuture().get(opCtx),
+                       DBException,
+                       ErrorCodes::SnapshotUnavailable);
+}
+
+TEST_F(ReshardingCoordinatorServiceTest, CoordinatorReturnsErrorCodeAfterRestart) {
+    const std::vector<CoordinatorStateEnum> states = {CoordinatorStateEnum::kPreparingToDonate,
+                                                      CoordinatorStateEnum::kCloning,
+                                                      CoordinatorStateEnum::kAborting};
+
+    PauseDuringStateTransitions stateTransitionsGuard(controller(), states);
+
+    auto opCtx = operationContext();
+    auto coordinator = initializeAndGetCoordinator();
+
+    stateTransitionsGuard.wait(CoordinatorStateEnum::kPreparingToDonate);
+    stateTransitionsGuard.unset(CoordinatorStateEnum::kPreparingToDonate);
+    waitUntilCommittedCoordinatorDocReach(opCtx, CoordinatorStateEnum::kPreparingToDonate);
+
+    makeDonorsReadyToDonate(opCtx);
+
+    stateTransitionsGuard.wait(CoordinatorStateEnum::kCloning);
+    stateTransitionsGuard.unset(CoordinatorStateEnum::kCloning);
+    waitUntilCommittedCoordinatorDocReach(opCtx, CoordinatorStateEnum::kCloning);
+
+    // Make recipients return error
+    {
+        auto coordDoc = getCoordinatorDoc(opCtx);
+        ASSERT_NE(coordDoc.getMetrics()->getDocumentCopy()->getStart(), Date_t::min());
+        auto shards = coordDoc.getRecipientShards();
+        RecipientShardContext ctx;
+        ctx.setState(RecipientStateEnum::kError);
+        Status abortReasonStatus{ErrorCodes::SnapshotUnavailable, "test simulated error"};
+        resharding::emplaceTruncatedAbortReasonIfExists(ctx, abortReasonStatus);
+
+        for (auto& shard : shards) {
+            shard.setMutableState(ctx);
+        }
+
+        coordDoc.setRecipientShards(shards);
+        replaceCoordinatorDoc(opCtx, coordDoc);
+    }
+
+    stateTransitionsGuard.wait(CoordinatorStateEnum::kAborting);
+    stateTransitionsGuard.unset(CoordinatorStateEnum::kAborting);
+    waitUntilCommittedCoordinatorDocReach(opCtx, CoordinatorStateEnum::kAborting);
+
+    stepDown(opCtx);
+    // Expected codes: CallbackCancelled or InterruptedDueToReplStateChange
+    ASSERT_THROWS(coordinator->getCompletionFuture().get(), DBException);
+
+    coordinator.reset();
+    stepUp(opCtx);
+
+    // Make recipients and donors transition to done
+    {
+        auto coordDoc = getCoordinatorDoc(opCtx);
+        auto recipientShards = coordDoc.getRecipientShards();
+
+        for (auto& shard : recipientShards) {
+            RecipientShardContext ctx;
+            ctx.setState(RecipientStateEnum::kDone);
+            shard.setMutableState(ctx);
+        }
+
+        coordDoc.setRecipientShards(recipientShards);
+
+        auto donorShards = coordDoc.getDonorShards();
+
+        for (auto& shard : donorShards) {
+            DonorShardContext ctx;
+            ctx.setState(DonorStateEnum::kDone);
+            shard.setMutableState(ctx);
+        }
+
+        coordDoc.setDonorShards(donorShards);
+        replaceCoordinatorDoc(opCtx, coordDoc);
+    }
+
+    auto instanceId =
+        BSON(ReshardingCoordinatorDocument::kReshardingUUIDFieldName << _reshardingUUID);
+    coordinator = getCoordinator(opCtx, instanceId);
+
+    ASSERT_THROWS_CODE(coordinator->getCompletionFuture().get(opCtx),
+                       DBException,
+                       ErrorCodes::SnapshotUnavailable);
+}
+
 }  // namespace
 }  // namespace mongo
