Update datasource.js

Return a real `Error` message for the default `ping()` method.
This commit is contained in:
Amir Jafarian 2016-06-17 11:36:13 -04:00
parent 892c228797
commit 5f8e28a6c0
1 changed files with 1 additions and 1 deletions

View File

@ -2150,7 +2150,7 @@ DataSource.prototype.ping = function(cb) {
self.discoverModelProperties('dummy', {}, cb); self.discoverModelProperties('dummy', {}, cb);
} else { } else {
process.nextTick(function() { process.nextTick(function() {
var err = self.connected ? null : 'Not connected'; var err = self.connected ? null : new Error('Not connected');
cb(err); cb(err);
}); });
} }