diff --git a/lib/index.js b/lib/index.js index 663e03e..8527da9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -404,7 +404,7 @@ export default class Now extends EventEmitter { } getNameservers(domain) { - return new Promise(resolve => { + return new Promise((resolve, reject) => { let fallback = false this.retry(async (bail, attempt) => { @@ -445,6 +445,8 @@ export default class Now extends EventEmitter { return ns.length }) resolve(body) + }).catch(err => { + reject(err) }) }) }