From 5f8e28a6c05701e3c19a70cc0263c821d71323d1 Mon Sep 17 00:00:00 2001 From: Amir Jafarian Date: Fri, 17 Jun 2016 11:36:13 -0400 Subject: [PATCH] Update datasource.js Return a real `Error` message for the default `ping()` method. --- lib/datasource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datasource.js b/lib/datasource.js index ef780e8e..bfc56b3e 100644 --- a/lib/datasource.js +++ b/lib/datasource.js @@ -2150,7 +2150,7 @@ DataSource.prototype.ping = function(cb) { self.discoverModelProperties('dummy', {}, cb); } else { process.nextTick(function() { - var err = self.connected ? null : 'Not connected'; + var err = self.connected ? null : new Error('Not connected'); cb(err); }); }