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

Parse error message body on non 200 HTTP status code #2

Merged
merged 1 commit into from Jan 14, 2014

Conversation

corydolphin
Copy link
Contributor

Error messages appear to be served as JSON, this commit adds parsing of them.

I would add tests, but I am having a hard time reading the format of the tests. These tests would create failure conditions i.e. searching for an entity which is not found, and assert a 404 is thrown, and the body is properly deserialized.

Thanks for the useful library, saved me some time!

@rgerard
Copy link
Owner

rgerard commented Jan 14, 2014

LGTM! Thanks @wcdolphin.

Yep, the tests definitely aren't ideal. This was a node learning project for me, so I'm sure there are amateur mistakes in here.

rgerard added a commit that referenced this pull request Jan 14, 2014
Parse error message body on non 200 HTTP status code
@rgerard rgerard merged commit 2281075 into rgerard:master Jan 14, 2014
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.

None yet

2 participants