Skip to content

Commit b34cfee

Browse files
chore: improve readibility
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 6488a4a commit b34cfee

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/utils/dpopUtils.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,15 @@ export async function withDPoPNonceRetry<T>(
186186
await applyRetryDelay(config);
187187
// Retry the request - the DPoP handle automatically learned the nonce
188188
return await fn();
189-
} else {
189+
} catch (error) {
190+
if (isDPoPNonceError(error)) {
191+
// This is a DPoP nonce error, retry with delay and jitter
192+
await applyRetryDelay(config);
193+
// Retry the request - the DPoP handle automatically learned the nonce
194+
return await fn();
195+
}
196+
throw error;
197+
}
190198
throw error;
191199
}
192200
}

0 commit comments

Comments
 (0)