chore: add default status codes only when retry attempts are configured #1010
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title:
Description:
🔄 What Changed
Modified the retry logic in
handlerUtils.ts
to only set default status codes for retry when retry attempts are actually configured (greater than 0).🔍 Impact of the Change
Improves the behavior of the retry mechanism by ensuring that retry status codes are only set when retry attempts are actually configured. This prevents unnecessary configuration when retries are not being used.
📁 Total Files Changed
1 file changed with 3 additions and 1 deletion in
src/handlers/handlerUtils.ts
.🧪 Test Added
N/A - The change is a minor logic improvement that doesn't require specific test coverage.
🔒 Security Vulnerabilities
N/A - No security vulnerabilities were introduced or addressed in this PR.
Motivation:
Related Issues: