SaketaChalamchala commented on code in PR #4987:
URL: https://github.com/apache/ozone/pull/4987#discussion_r1267408340


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/exception/S3ErrorTable.java:
##########
@@ -126,6 +126,10 @@ private S3ErrorTable() {
   public static final OS3Exception NO_OVERWRITE = new OS3Exception(
       "Conflict", "Cannot overwrite file with directory", HTTP_CONFLICT);
 
+  public static final OS3Exception INVALID_LENGTH = new OS3Exception(
+      "InvalidLength", "Provided length did not match the actual body length." 
+
+      " The content might have been changed mid-way.", HTTP_BAD_REQUEST);

Review Comment:
   According to [AWS S3 error 
codes](https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList)
 the return code and message for this scenario should be
   
   `IncompleteBody | You did not provide the number of bytes specified by the 
Content-Length HTTP header. | 400 Bad Request `
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to