[ 
https://issues.apache.org/jira/browse/HDDS-560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634484#comment-16634484
 ] 

Bharat Viswanadham edited comment on HDDS-560 at 10/1/18 7:03 PM:
------------------------------------------------------------------

[~anu] , [~elek] Thanks for the review.

Uploaded the patch to throw IOException and OS3Exception, instead of Exception.

And for like unhandled exceptions in else case, not sure what error codes needs 
to be set there, so not done in this patch. But we should handle them as we 
progress, because if service exception raises, we set the cause of that service 
exception and throw as IOException. Need to look in, how we need to handle 
these scenarios.

 

This is intial patch, which provides base framework classes for Ozone 
S3Exception handling, but this has not completely handled everything.

Attached patch v01.

 


was (Author: bharatviswa):
[~anu] , [~elek] Thanks for the review.

Uploaded the patch to throw IOException and OS3Exception, instead of Exception.

And for like unhandled exceptions in else case, not sure what error codes needs 
to be set there, so not done in this patch. But we should handle them as we 
progress, because if service exception raises, we set the cause of that service 
exception and throw as IOException. Need to look in, how we need to handle 
these scenarios.

 

Attached patch v01.

 

> Create Generic exception class to be used by S3 rest services
> -------------------------------------------------------------
>
>                 Key: HDDS-560
>                 URL: https://issues.apache.org/jira/browse/HDDS-560
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>         Attachments: HDDS-560.00.patch, HDDS-560.01.patch
>
>
> Exception class should have the following fields, and structure should be as 
> below:
>  
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <Error>
> <Code>NoSuchKey</Code>
> <Message>The resource you requested does not exist</Message> 
> <Resource>/mybucket/myfoto.jpg</Resource>
> <RequestId>4442587FB7D0A2F9</RequestId>
> </Error>
> {code}
>  
>  
> https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to