Changed error message when snapshot is not on secondary when trying to perform download (#12462)

Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
This commit is contained in:
Tonitzpp 2026-01-28 01:42:57 -03:00 committed by GitHub
parent 5aced73250
commit 66665b883c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -578,8 +578,9 @@ public class SnapshotManagerImpl extends MutualExclusiveIdsManagerBase implement
}
if (ObjectUtils.anyNull(chosenStore, snapshotDataStoreReference)) {
logger.error("Snapshot [{}] not found in any secondary storage.", snapshot);
throw new InvalidParameterValueException("Snapshot not found.");
String errorMessage = String.format("Snapshot [%s] not found in any secondary storage. The snapshot may be on primary storage, where it cannot be downloaded.", snapshot.getUuid());
logger.error(errorMessage);
throw new InvalidParameterValueException(errorMessage);
}
snapshotSrv.syncVolumeSnapshotsToRegionStore(snapshot.getVolumeId(), chosenStore);