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

Give clear results when report promise completes #59

Merged
merged 1 commit into from
Dec 9, 2018

Conversation

bz2
Copy link
Contributor

@bz2 bz2 commented Dec 7, 2018

If the XMLHttpRequest fails or a non-2XX code results the promise will be rejected with an Error. Otherwise it will resolve with the message reported included.

Fixes #32

Was tempted to just resolve(payload) but that object includes some instance level config that could accidentally be mutated, so be conservative for now. Will need to update README with usage suggestions later.

@bz2 bz2 mentioned this pull request Dec 7, 2018
9 tasks
If the XMLHttpRequest fails or a non-2XX code results the promise
will be rejected with an Error. Otherwise it will resolve with the
message reported included.

Fixes GoogleCloudPlatform#32
@steren steren merged commit ca5e167 into GoogleCloudPlatform:master Dec 9, 2018
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.

report() should allow handling of non-200 Stackdriver responses
2 participants