Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public Response get(
} catch (OMException ex) {
if (ex.getResult() == ResultCodes.PERMISSION_DENIED) {
throw S3ErrorTable.newError(S3ErrorTable.ACCESS_DENIED, bucketName);
} else if (ex.getResult() == ResultCodes.FILE_NOT_FOUND) {
throw S3ErrorTable.newError(S3ErrorTable.FILE_NOT_FOUND, bucketName);
} else if (ex.getResult() == ResultCodes.DIRECTORY_NOT_FOUND) {
throw S3ErrorTable
.newError(S3ErrorTable.DIRECTORY_NOT_FOUND, bucketName);
} else {
throw ex;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ private S3ErrorTable() {
"NotImplemented", "This part of feature is not implemented yet.",
HTTP_NOT_IMPLEMENTED);

public static final OS3Exception FILE_NOT_FOUND = new OS3Exception(
"FileNotFind", "File is not found.", HTTP_NOT_FOUND);

public static final OS3Exception DIRECTORY_NOT_FOUND = new OS3Exception(
"DirectoryNotFind", "Directory is not found.", HTTP_NOT_FOUND);

/**
* Create a new instance of Error.
* @param e Error Template
Expand Down