-
fix: retry post-creation API calls on 422 eventual consistency errors (#4356)
released this
2026-04-10 16:23:55 +00:00 Add retry logic to handle GitHub API eventual consistency errors that
can occur after creating a new pull request. Follow-up API calls for
milestones, labels, assignees, and reviewers may fail with a 422
"Could not resolve to a node" error before the PR is fully propagated.- Add generic
retryWithBackoffhelper insrc/utils.tswith
exponential backoff (default 2 retries, starting at 1s delay) - Wrap post-creation API calls in
src/github-helper.tswith
withRetryForNewPr(), which only retries for newly created PRs - Use
@octokit/request-errorRequestErrortype for precise error
matching (status 422 + "Could not resolve to a node" message) - Add unit tests for
retryWithBackoffcovering success, retry,
exhaustion, and non-retryable error scenarios - Update
dist/index.jsbundle andpackage.jsondependencies
Downloads
- Add generic