Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in HTTP StatusCode error handling logic #16

Merged
merged 1 commit into from
Feb 8, 2025
Merged

Bug in HTTP StatusCode error handling logic #16

merged 1 commit into from
Feb 8, 2025

Conversation

rchrabas
Copy link
Contributor

The following else if desc := res.Get("error.messages.0.description"); desc.Exists() { introduced a bug into the code.
In case the FMC would respond with any error message, the main loop would continue as the final else is always skipped.
This would make requests resulting in error (regardless what it is) repeat until max backoff count is reached.

Proposal is to put the final statements, that return error outside of else block, which will make this block always executed, unless any condition continue the loop.

@rchrabas rchrabas requested a review from danischm January 31, 2025 11:48
@danischm danischm merged commit b5e5a36 into main Feb 8, 2025
1 check passed
@danischm danischm deleted the fix_retry branch February 8, 2025 06:50
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