Skip to content

Commit

Permalink
Merge pull request #15043 from Automattic/vkarpov15/gh-15039
Browse files Browse the repository at this point in the history
fix: save execution stack in query as string
  • Loading branch information
vkarpov15 authored Nov 15, 2024
2 parents 6fbe9f0 + 68377ff commit d21a239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helpers/query/wrapThunk.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ module.exports = function wrapThunk(fn) {
str = str.slice(0, 60) + '...';
}
const err = new MongooseError('Query was already executed: ' + str);
err.originalStack = this._executionStack.stack;
err.originalStack = this._executionStack;
return cb(err);
}
this._executionStack = new Error();
this._executionStack = new Error().stack;

fn.call(this, cb);
};
Expand Down

0 comments on commit d21a239

Please sign in to comment.