Skip to content

Commit

Permalink
add retry lib
Browse files Browse the repository at this point in the history
  • Loading branch information
shulkaolka committed Nov 30, 2023
1 parent 00d783b commit e7cccc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/lib/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const executeSwaggerCall = async function (callParams) {
const response = await Swagger.execute(callParams);
resolve(response);
} catch (error) {
if (operation.retry(error) && error.status && error.status > 400 && error.status !== 401 && error.status !== 403) {
if (operation.retry(error) && error.status && error.status > 400 && error.status !== 401 && error.status !== 403 && error.status !== 422) {
this.logger.info(`Received response status: ${error.status}. Attempt #${currentAttempt}. Retrying in ${operation._originalTimeouts[currentAttempt-1]} ms...`);
return;
}
Expand Down

0 comments on commit e7cccc0

Please sign in to comment.