You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "priyeshkaratha (via GitHub)" <gi...@apache.org> on 2026/07/23 09:22:14 UTC

[PR] HDDS-15940. Handle unexpected OMExceptions in S3 putBucketLifecycleConfiguration [ozone]

priyeshkaratha opened a new pull request, #10848:
URL: https://github.com/apache/ozone/pull/10848

   ## What changes were proposed in this pull request?
   
   `BucketCrudHandler.putBucketLifecycleConfiguration()` was catching OMException, but it only re-threw the exception for `ACCESS_DENIED` and `INVALID_REQUEST`. If any other error occurred such as `QUOTA_EXCEEDED`, `NOT_SUPPORTED_OPERATION`, or an unexpected internal OM error, then the exception was swallowed. The method then returned Response.ok().build(), causing the client to receive an incorrect HTTP 200 success response even though the operation had actually failed.
   
   Other S3 gateway handlers don't behave this way. They simply convert every OMException into the appropriate S3 error by calling
   
   ```
   } catch (OMException ex) {
     throw S3ErrorTable.newError(bucketName, ex);
   }
   ```
   
   This change makes BucketCrudHandler follow the same pattern. S3ErrorTable.newError(bucketName, ex) translates the OM error into the correct S3 response. For example, `QUOTA_EXCEEDED` becomes a 403 response, while unexpected errors become InternalError (HTTP 500). `ACCESS_DENIED` and `INVALID_REQUEST` continue to behave exactly as before, but now the original exception is also preserved as the cause, making audit logs and stack traces more useful and consistent with the improvements from HDDS-15000.
   
   ## What is the link to the Apache JIRA
   
   HDDS-15940
   
   ## How was this patch tested?
   
   Tested using added test cases and existing unit test cases.
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15940. Handle unexpected OMExceptions in S3 putBucketLifecycleConfiguration [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi merged PR #10848:
URL: https://github.com/apache/ozone/pull/10848


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org