Skip to content

Commit

Permalink
use retry only if status code > 499 or === 429
Browse files Browse the repository at this point in the history
  • Loading branch information
shulkaolka committed Oct 28, 2024
1 parent f024b76 commit cd5e294
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions templates/lib/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ const executeSwaggerCall = async function (callParams) {
if (
operation.retry(error) &&
error.status &&
error.status > 400 &&
error.status !== 401 &&
error.status !== 403 &&
error.status !== 409 &&
error.status !== 422
(error.status > 499 || error.status === 429)
) {
this.logger.info(
`Received response status: ${error.status}. Attempt #${currentAttempt}. Retrying in ${operation._originalTimeouts[currentAttempt - 1]
Expand Down

0 comments on commit cd5e294

Please sign in to comment.