Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
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:
Server Error (Service: Amazon S3; Status Code: 500; Error Code: 500 Server Error; Request ID: null; S3 Extended Request ID: null; Proxy: null)
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:
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)
Attachments
Issue Links
- relates to
-
HDDS-6419 Provide better error message for malformed auth header
- Resolved
- links to