Fix error message for checkVolume command (#8842)

This commit is contained in:
Vishesh 2024-04-17 17:27:27 +05:30 committed by GitHub
parent 44b8d3af0c
commit 8511014707
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1895,7 +1895,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
} else if (jobResult instanceof ResourceAllocationException) {
throw (ResourceAllocationException)jobResult;
} else if (jobResult instanceof Throwable) {
throw new RuntimeException("Unexpected exception", (Throwable)jobResult);
Throwable throwable = (Throwable) jobResult;
throw new RuntimeException(String.format("Unexpected exception: %s", throwable.getMessage()), throwable);
}
}