Skip to content

Commit 4e583e8

Browse files
committed
Fix error messages when first starting up
1 parent 4baef5e commit 4e583e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/connection.js

+2
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
385385
}
386386

387387
function queryError(query, err) {
388+
if (typeof query !== 'object') throw err
389+
388390
'query' in err || 'parameters' in err || Object.defineProperties(err, {
389391
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
390392
query: { value: query.string, enumerable: options.debug },

0 commit comments

Comments
 (0)