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

Add responseHeaders errors #46

Merged
merged 1 commit into from
May 23, 2015
Merged

Add responseHeaders errors #46

merged 1 commit into from
May 23, 2015

Conversation

BillAtPros
Copy link
Contributor

This code adds the responseHeaders to the error passed to defferred.reject when a call fails. This provides additional insight into the failure by exposing the response headers and allows handling cases like 429 codes where additional info (the retry time) is contained in the response headers.

big assist from @shpros

small additional cleanup
Update readme.md to be more non-node expert friendly
Fix typo in test.js
Add/Merge responseHeaders to error before calling defer.reject in all wrapped calls.
This allows upstream caller to inspect Headers in order to potentially determine source of the error.
Add test case.

Update readme.md to be more non-node expert friendly
Fix typo in test.js
Add/Merge responseHeaders to error before calling defer.reject in all wrapped calls.
This allows upstream caller to inspect Headers in order to potentially determine source of the error.
@azurecla
Copy link

Hi @BillAtPros, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, AZPRBOT;

shipunyc added a commit that referenced this pull request May 23, 2015
@shipunyc shipunyc merged commit 47802de into Azure:master May 23, 2015
@shpros shpros mentioned this pull request Jun 2, 2015
shipunyc added a commit to shipunyc/azure-documentdb-node that referenced this pull request Jun 3, 2015
shipunyc added a commit that referenced this pull request Jun 3, 2015
Re-applies change: Add responseHeaders errors #46, and fixes a few ad…
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

Successfully merging this pull request may close these issues.

3 participants