Skip to content
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

Promises wrapper does not include headers with error #45

Closed
shpros opened this issue May 13, 2015 · 8 comments
Closed

Promises wrapper does not include headers with error #45

shpros opened this issue May 13, 2015 · 8 comments

Comments

@shpros
Copy link

shpros commented May 13, 2015

We're getting 429s from methods as various as createDocument, queryCollections, and queryStoredProcedures. Until #39 is addressed, we would like to handle the retry ourselves, but we're using the promises flavor, which doesn't return the headers with the error. It would be great to have headers returned on error in the promises flavor. Currently, all of the deferred.reject() calls pass only the error, and swallow the headers, so we don't get the x-ms-retry-after-ms header or any other headers. See e.g. https://github.com/Azure/azure-documentdb-node/blob/master/q_promises_sdk/documentclientwrapper.js#L16

@shpros
Copy link
Author

shpros commented May 13, 2015

We'd like to fork and take a crack at this if that's ok.

@ghost
Copy link

ghost commented May 13, 2015

Absolutely. We'd love to accept contributions from the community.

@shpros
Copy link
Author

shpros commented May 13, 2015

Great, we should have a PR for you soon.

@BillAtPros
Copy link
Contributor

PR #46 submitted.

@ghost
Copy link

ghost commented May 15, 2015

Thanks, we'll take a look shortly.

@BillAtPros
Copy link
Contributor

Bump.

@ghost
Copy link

ghost commented May 23, 2015

Sorry for the delay in getting to this. I will chase up the reviewers now.

@ghost
Copy link

ghost commented May 23, 2015

Closed with PR #46

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants