mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
Merge pull request #36 from ByronLudwig/fix/nosuchversion-error-code
fix: return NoSuchVersion error for non-existent versionId
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -248,7 +248,9 @@ public class S3Service {
|
||||
}
|
||||
|
||||
S3Object obj = objectStore.get(storeKey)
|
||||
.orElseThrow(() -> new AwsException("NoSuchKey", "The specified key does not exist.", 404));
|
||||
.orElseThrow(() -> versionId != null
|
||||
? new AwsException("NoSuchVersion", "The specified version does not exist.", 404)
|
||||
: new AwsException("NoSuchKey", "The specified key does not exist.", 404));
|
||||
|
||||
if (obj.isDeleteMarker()) {
|
||||
throw new AwsException("NoSuchKey", "The specified key does not exist.", 404);
|
||||
|
||||
Reference in new issue
Block a user