diff --git a/lib/asyncify.js b/lib/asyncify.js index 74ba75616..13978b8d7 100644 --- a/lib/asyncify.js +++ b/lib/asyncify.js @@ -87,7 +87,7 @@ function handlePromise(promise, callback) { return promise.then(value => { invokeCallback(callback, null, value); }, err => { - invokeCallback(callback, err instanceof Error ? err : new Error(err)); + invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err)); }); }