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

fix: use consistent fields between success and error response objects #78

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

dpopp07
Copy link
Member

@dpopp07 dpopp07 commented Jan 29, 2020

The fields status and statusText are now added to the response error, to be consistent with the fields on a successful response object. The other fields are left intact for compatibility but are marked as deprecated so we know to remove them in the next major release.

* add fields `status` and `statusText` to error responses to match success responses
@dpopp07 dpopp07 requested a review from mkistler January 29, 2020 19:11
Copy link
Contributor

@mkistler mkistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

At some point we should consider creating a custom error class that defines the properties that will be returned.

@dpopp07
Copy link
Member Author

dpopp07 commented Jan 30, 2020

That's a good idea. I'll open an issue for that on our board.

@dpopp07 dpopp07 merged commit 902d712 into master Jan 30, 2020
@dpopp07 dpopp07 deleted the error-response-fields branch January 30, 2020 15:22
ibm-devx-automation pushed a commit that referenced this pull request Jan 30, 2020
## [2.0.4](v2.0.3...v2.0.4) (2020-01-30)

### Bug Fixes

* use consistent fields between success and error response objects ([#78](#78)) ([902d712](902d712))
@ibm-devx-automation
Copy link

🎉 This PR is included in version 2.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants