Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -366,6 +366,8 @@ public Response put(
throw os3Exception;
} else if (isAccessDenied(ex)) {
throw newError(S3ErrorTable.ACCESS_DENIED, keyPath, ex);
} else if (ex.getResult() == ResultCodes.QUOTA_EXCEEDED) {
throw newError(S3ErrorTable.QUOTA_EXCEEDED, keyPath, ex);
} else if (ex.getResult() == ResultCodes.BUCKET_NOT_FOUND) {
throw newError(S3ErrorTable.NO_SUCH_BUCKET, bucketName, ex);
} else if (ex.getResult() == ResultCodes.FILE_ALREADY_EXISTS) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ private S3ErrorTable() {
"MalformedXML", "The XML you provided was not well-formed or did not " +
"validate against our published schema", HTTP_BAD_REQUEST);

public static final OS3Exception QUOTA_EXCEEDED = new OS3Exception(
"QuotaExceeded", "The quota has been exceeded. " +
"Please review your disk space or namespace usage and adjust accordingly.",
HTTP_FORBIDDEN
);

public static OS3Exception newError(OS3Exception e, String resource) {
return newError(e, resource, null);
}
Expand Down