Skip to content

Commit

Permalink
Update client.js
Browse files Browse the repository at this point in the history
  • Loading branch information
freshlogic committed Jan 10, 2019
1 parent 94be66a commit 985dae6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function NewgisticsClient(args) {
}

if (res.statusCode !== 200) {
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body || ''}`.trim()));
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body}`));
}

callback();
Expand Down Expand Up @@ -79,7 +79,7 @@ function NewgisticsClient(args) {
}

if (res.statusCode !== 200) {
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body || ''}`.trim()));
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body}`));
}

callback(null, package.data);
Expand Down Expand Up @@ -117,7 +117,7 @@ function NewgisticsClient(args) {
}

if (res.statusCode !== 200) {
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body || ''}`.trim()));
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body}`));
}

// Put the token in memory cache
Expand All @@ -140,7 +140,7 @@ function NewgisticsClient(args) {
}

if (res.statusCode !== 200) {
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body || ''}`.trim()));
return callback(new Error(`${res.statusCode} ${res.request.method} ${res.request.href} ${res.body}`));
}

callback(null, pong);
Expand Down

0 comments on commit 985dae6

Please sign in to comment.