diff --git a/lib/datasource.js b/lib/datasource.js index 05295857..8b33d0a5 100644 --- a/lib/datasource.js +++ b/lib/datasource.js @@ -2151,7 +2151,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); }); }