Handle NoSuchBucket during copy object

pull/36/head
Andrew Gaul 2015-01-16 15:14:34 -08:00
rodzic 678ae67754
commit e1c7b22b7d
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -878,7 +878,13 @@ final class S3ProxyHandler extends AbstractHandler {
return;
}
Blob blob = blobStore.getBlob(sourceContainerName, sourceBlobName);
Blob blob;
try {
blob = blobStore.getBlob(sourceContainerName, sourceBlobName);
} catch (ContainerNotFoundException cnfe) {
sendSimpleErrorResponse(response, S3ErrorCode.NO_SUCH_BUCKET);
return;
}
if (blob == null) {
sendSimpleErrorResponse(response, S3ErrorCode.NO_SUCH_KEY);
return;