Skip to content

Commit 30064fe

Browse files
author
STAFYNIAK Sacha
committed
add port to connection error message
1 parent a255ace commit 30064fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Kuzzle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Kuzzle.prototype.connect = function () {
363363
});
364364

365365
self.network.onConnectError(function (error) {
366-
var connectionError = new Error('Unable to connect to kuzzle proxy server at "' + self.host + '"');
366+
var connectionError = new Error('Unable to connect to kuzzle proxy server at "' + self.host + ':' + self.port + '"');
367367

368368
connectionError.internal = error;
369369
self.state = 'error';

test/kuzzle/connect.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('Kuzzle connect', function () {
8181
it('should call the provided callback on a connection error', function (done) {
8282
var kuzzle = new Kuzzle('nowhere', {connect: 'manual'}, function (err, res) {
8383
should(err).be.instanceOf(Error);
84-
should(err.message).be.exactly('Unable to connect to kuzzle proxy server at "nowhere"');
84+
should(err.message).be.exactly('Unable to connect to kuzzle proxy server at "nowhere:7512"');
8585
should(err.internal.message).be.exactly('Mock Error');
8686
should(res).be.undefined();
8787
should(kuzzle.state).be.exactly('error');

0 commit comments

Comments
 (0)