Skip to content

Commit e4f189c

Browse files
committed
fixed error message if body is undefined
1 parent 0d99c8d commit e4f189c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rest_client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports.RestClient = function (options) {
4747
} else if (!httpCallSucceeded(response)) {
4848
reject({
4949
code: response.statusCode,
50-
errorMessage: body.result || response.statusMessage
50+
errorMessage: (body || {}).result || response.statusMessage
5151
});
5252
}
5353
resolve(body);

0 commit comments

Comments
 (0)