Open omril1 opened 2 weeks ago
The only way I found to resolve this properly is to not depend on the retry
package: https://github.com/sindresorhus/p-retry/pull/79
The only way I found to resolve this properly is to not depend on the
retry
package: #79
That sounds way better than what I suggested đŸ˜…
When using pRetry with retry count >= 1, the stack trace of the original calling function is not preserved, which complicates debugging, especially if the code wasn't written with this behavior in mind.
Example:
Running
node pRetryStack.mjs
Would print:
While the commented out code would print:
Suggestion: One possible solution could be to capture the original stack trace and add it as a property to the error, making it easier to trace the origin of the issue while retaining the retry context.