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

Commit

Permalink
don't mess with my errors
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Nov 23, 2015
1 parent 863b201 commit fc96f93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/request-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ function onRes (buffer, cb) {

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

This comment has been minimized.

Copy link
@dignifiedquire

dignifiedquire Nov 23, 2015

Contributor

that's bad, there needs to be a return

This comment has been minimized.

Copy link
@daviddias

daviddias Nov 23, 2015

Author Contributor

Oh, right! Missed that one! Will add once I get wifi. Thank you

This comment has been minimized.

Copy link
@dignifiedquire

dignifiedquire Nov 23, 2015

Contributor

Fixed

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

0 comments on commit fc96f93

Please sign in to comment.