diff --git a/lib/api/api-request.js b/lib/api/api-request.js index 2c86dd07c58..b53f5c25d8b 100644 --- a/lib/api/api-request.js +++ b/lib/api/api-request.js @@ -175,7 +175,7 @@ class RequestHandler extends AsyncResource { function request (opts, callback) { if (callback === undefined) { - return new Promise((resolve, reject) => { + return new Promise(function asyncRequest (resolve, reject) { request.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data) })