adoroszlai commented on PR #2424:
URL: https://github.com/apache/ozone/pull/2424#issuecomment-1767914171

   Shouldn't we catch `InvalidPathException` and report `INVALID_PATH` in the 
response?
   
   To clarify my previous suggestion:
   
   ```
       } catch (IOException | InvalidPathException ex) {
         exception = ex instanceof IOException ? (IOException) ex :
             new OMException(ex.getMessage(),
                 OMException.ResultCodes.INVALID_PATH);
         omClientResponse = new OMBucketCreateResponse(
             createErrorOMResponse(omResponse, exception));
   ```
   
   should be:
   
   ```
       } catch (IOException | InvalidPathException ex) {
         exception = ex;
         omClientResponse = new OMBucketCreateResponse(
             createErrorOMResponse(omResponse, ex));
   ```
   
   `createErrorOMResponse` (and `exceptionToResponseStatus`) should handle 
`InvalidPathException`, setting `INVALID_PATH`  as response status.


-- 
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