Skip to content

Commit

Permalink
npm run build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgleason committed Sep 16, 2024
1 parent 774c7a1 commit 1f7b14e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cf/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
}

function queryError(query, err) {
Object.defineProperties(err, {
if (typeof query !== 'object') throw err

'query' in err || 'parameters' in err || Object.defineProperties(err, {
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
query: { value: query.string, enumerable: options.debug },
parameters: { value: query.parameters, enumerable: options.debug },
Expand Down
4 changes: 3 additions & 1 deletion cjs/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
}

function queryError(query, err) {
'parameters' in err || Object.defineProperties(err, {
if (typeof query !== 'object') throw err

'query' in err || 'parameters' in err || Object.defineProperties(err, {
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
query: { value: query.string, enumerable: options.debug },
parameters: { value: query.parameters, enumerable: options.debug },
Expand Down

0 comments on commit 1f7b14e

Please sign in to comment.