summaryrefslogtreecommitdiff
path: root/lib/async.js
diff options
context:
space:
mode:
authorAydar Zartdinov <zartdinov@gmail.com>2015-07-09 07:25:46 +0300
committerAydar Zartdinov <zartdinov@gmail.com>2015-07-09 07:25:46 +0300
commit725fdb2aaaa114b23583067a7099d817f806b146 (patch)
tree464d7f6bee4ab0f572fa75b833a2f4a9443136eb /lib/async.js
parent4be3c68a8014acba23cde6d57f9a48efad31839c (diff)
downloadasync-725fdb2aaaa114b23583067a7099d817f806b146.tar.gz
unit test for bluebird promisified functions
Diffstat (limited to 'lib/async.js')
-rw-r--r--lib/async.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/async.js b/lib/async.js
index e756854..32a2d82 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -1194,7 +1194,7 @@
result.then(function(value) {
callback(null, value);
}).catch(function(err) {
- callback(new Error(err));
+ callback(err.message ? err : new Error(err));
});
} else {
callback(null, result);