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); }); }