Skip to content

Commit

Permalink
Chore: log failed URL
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Feb 8, 2025
1 parent 339eecb commit 80c7d4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Build/lib/fetch-retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ setGlobalDispatcher(agent.compose(
retry(err, { state, opts }, cb) {
const errorCode = 'code' in err ? (err as NodeJS.ErrnoException).code : undefined;

Object.defineProperty(err, '_url', {
value: opts.method + ' ' + opts.origin?.toString() + opts.path
});

// Any code that is not a Undici's originated and allowed to retry
if (
errorCode === 'ERR_UNESCAPED_CHARACTERS'
Expand Down

0 comments on commit 80c7d4a

Please sign in to comment.