priyeshkaratha opened a new pull request, #11189: URL: https://github.com/apache/ozone/pull/11189
## What changes were proposed in this pull request? `PutBucketLifecycleConfiguration` was returning only the generic "Invalid Request" message for any lifecycle configuration rejected by OM — for example, a lifecycle rule with an `Expiration.Date` in the past — with no indication of *why* the request was rejected. `BucketLifecycleHandler.putBucketLifecycleConfiguration()` catches `OMException` from both the client-side rule validation and the `ozoneBucket.setLifecycleConfiguration(...)` RPC call, and rethrows it as an `OS3Exception` via `S3ErrorTable.newError(...)`. However, `OS3Exception`'s constructor always sets `errorMessage` to the static generic `S3ErrorTable` text and never copies the underlying cause's message, so OM's specific validation detail (e.g. "Invalid lifecycle configuration: 'Date' must be in the future ...") never reached the client. This chains `.withMessage(ex.getMessage())` onto the `OS3Exception` at all three `S3ErrorTable.newError(...)` call sites in `putBucketLifecycleConfiguration()`, matching the existing pattern already used in `MessageUnmarshaller` and `CompleteMultipartUploadRequestUnmarshaller` for the same purpose. ## What is the link to the Apache JIRA HDDS-16372 ## How was this patch tested? Tested using added 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: [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]
