Skip to content

Commit

Permalink
Don't reassign to errors
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed May 15, 2024
1 parent e05585b commit f58cd4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cjs/src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
}

function queryError(query, err) {
Object.defineProperties(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 f58cd4f

Please sign in to comment.