Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix(request): Return on parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Nov 23, 2015
1 parent 65d8c32 commit 9fd8ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/request-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function onRes (buffer, cb) {

Wreck.read(res, {json: true}, (err, payload) => {
if (err) {
cb(err)
return cb(err)

This comment has been minimized.

Copy link
@daviddias

daviddias Nov 23, 2015

Contributor

thank you, @dignifiedquire :)

}
if (payload) {
error.code = payload.Code
Expand Down

0 comments on commit 9fd8ced

Please sign in to comment.