You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Marton Elek (Jira)" <ji...@apache.org> on 2021/05/14 09:35:00 UTC

[jira] [Resolved] (HDDS-5128) S3gateway didn't return correct error messages while using S3-sdk

     [ https://issues.apache.org/jira/browse/HDDS-5128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marton Elek resolved HDDS-5128.
-------------------------------
    Fix Version/s: 1.2.0
       Resolution: Fixed

> S3gateway didn't return correct error messages while using S3-sdk
> -----------------------------------------------------------------
>
>                 Key: HDDS-5128
>                 URL: https://issues.apache.org/jira/browse/HDDS-5128
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Janus Chow
>            Assignee: Janus Chow
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.2.0
>
>
> When connecting to S3 gateway using S3-sdk, users can get some unclear error messages from S3 gateway. For example, if the user didn't specify _accessId_ the error message would be as follows:
> {code:java}
> Server Error (Service: Amazon S3; Status Code: 500; Error Code: 500 Server Error; Request ID: null; S3 Extended Request ID: null; Proxy: null)
> {code}
> The user would assume it's a server-side exception and come to ask if the cluster got some error, after checking the logs, we found it's caused by user not specifying authenticate information. This information should be returned to users to save both the client and server side's time.
> After checking the root cause, it's caused by weld-core put the _OS3Exception_ inside the _CreationException_ provided by the CDI annotation of _@produces_, then jersey wrapped the exception because it's not a _WebApplicationException_.
> The fixed version of error message for the above scenario is as follows:
> {code:java}
> The authorization header you provided is invalid. (Service: Amazon S3; Status Code: 404; Error Code: AuthorizationHeaderMalformed; Request ID: 2102408b-f97b-477f-8510-07e7008792be; S3 Extended Request ID: null; Proxy: null){code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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