kopia lustrzana https://github.com/gaul/s3proxy
Map KeyNotFoundException to NoSuchKey
Unfortunately jclouds inconsistently throws ContainerNotFoundException and KeyNotFoundException.pull/101/head
rodzic
bc2b18ee2b
commit
22ed1c542c
|
@ -248,6 +248,12 @@ final class S3ProxyHandler extends AbstractHandler {
|
|||
response.sendError(hre.getResponse().getStatusCode());
|
||||
baseRequest.setHandled(true);
|
||||
return;
|
||||
} catch (KeyNotFoundException knfe) {
|
||||
S3ErrorCode code = S3ErrorCode.NO_SUCH_KEY;
|
||||
sendSimpleErrorResponse(request, response, code, code.getMessage(),
|
||||
ImmutableMap.<String, String>of());
|
||||
baseRequest.setHandled(true);
|
||||
return;
|
||||
} catch (S3Exception se) {
|
||||
sendSimpleErrorResponse(request, response, se.getError(),
|
||||
se.getMessage(), se.getElements());
|
||||
|
|
Ładowanie…
Reference in New Issue