Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-5128

S3gateway didn't return correct error messages while using S3-sdk

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • S3

    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

          Activity

            People

              Symious Janus Chow
              Symious Janus Chow
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: