Skip to content

Fix: Enhance retry logic to handle 409 conflict errors in requests#2103

Merged
prklm10 merged 2 commits intomasterfrom
PER-6806
Feb 12, 2026
Merged

Fix: Enhance retry logic to handle 409 conflict errors in requests#2103
prklm10 merged 2 commits intomasterfrom
PER-6806

Conversation

@prklm10
Copy link
Copy Markdown
Contributor

@prklm10 prklm10 commented Feb 11, 2026

This pull request enhances the HTTP request retry logic in the client utilities to handle 409 Conflict errors in addition to existing retryable errors. It also adds improved logging for retry attempts and introduces new tests to ensure correct behavior when 409 errors occur.

Retry logic improvements:

  • The retry utility now passes the current attempt number to the callback, allowing for more informative logging and control over retry behavior. [1] [2]
  • The request logic has been updated to automatically retry on HTTP 409 Conflict responses, in addition to 5xx errors and specific error codes.
  • Added debug logging to indicate when and why a request is being retried, including the attempt number and error reason.

Testing enhancements:

  • Added tests to verify that 409 Conflict errors are retried and eventually succeed or fail after exhausting all retries (client.test.js and request.test.js). [1] [2]

@prklm10 prklm10 merged commit 13059dd into master Feb 12, 2026
41 checks passed
@prklm10 prklm10 deleted the PER-6806 branch February 12, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants