scality / cloudserver

Zenko CloudServer, an open-source Node.js implementation of the Amazon S3 protocol on the front-end and backend storage capabilities to multiple clouds, including Azure and Google.
https://www.zenko.io/cloudserver
Apache License 2.0
1.7k stars 240 forks source link

COMPAT: AWS returns additional XML tags for InvalidArgument Error #403

Open bennettbuchanan opened 7 years ago

bennettbuchanan commented 7 years ago

If an invalid encoding type is given, AWS returns an error with additional XML tags ArgumentName, ArgumentValue and HostId. For example, if an invalid encoding 'foo' is given, see difference of the two responses below.

AWS response:

<Error>
    <Code>InvalidArgument</Code>
    <Message>Invalid Encoding Method specified in Request</Message>
    <ArgumentName>encoding-type</ArgumentName>
    <ArgumentValue>foo</ArgumentValue>
    <RequestId>[...]</RequestId>
    <HostId>[...]</HostId>
</Error>

S3 response (response with changes made in https://github.com/scality/S3/pull/402):

<Error>
    <Code>InvalidArgument</Code>
    <Message>Invalid Encoding Method specified in Request</Message>
    <Resource></Resource>
    <RequestId>[...]</RequestId>
</Error>
rahulreddy commented 6 years ago

@bennettbuchanan May be you can pick this up yourself 😄