-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3.getBucketPolicy() returns error for valid policy #49
Comments
The issue here is that the HTTP response body is pure JSON, but it's being parsed as XML instead. |
The API configuration for the S3 client correctly indicates the response data should have a Policy property that should be sourced from the HTTP response body. It appears the RestXml service interface is not looking at this portion of the API configuration and therefore falls back onto the default XML parsing. This should not be a difficult fix. |
Awesome. I'm assuming a new version will be published to npm shortly? |
There will be another release including this fix. Until then, you can ignore this parser error and use the following workaround: s3.client.getBucketPolicy(params, function() {
console.log(this.httpResponse.body.toString());
}); |
Non-binary payloads will now be returned as strings, not Buffers References #49
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
When calling S3.getBucketPolicy(), I'm getting the following error passed to the callback:
The text was updated successfully, but these errors were encountered: