Skip to content

Commit

Permalink
fix: adding a new condition for retrying the function creation in pyt…
Browse files Browse the repository at this point in the history
…hon transformation
  • Loading branch information
abhimanyubabbar committed Aug 27, 2024
1 parent 4cb2799 commit 6992035
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ const deployFaasFunction = async (
// To handle concurrent create requests,
// throw retry error if deployment or service already exists so that request can be retried
if (
(error.statusCode === 500 || error.statusCode === 400) &&
error.message.includes('already exists')
((error.statusCode === 500 || error.statusCode === 400) &&
error.message.includes('already exists')) ||
(error.statusCode === 409 && error.message.includes('Conflict change already made'))
) {
setFunctionInCache(functionName);
throw new RetryRequestError(`${functionName} already exists`);
Expand Down

0 comments on commit 6992035

Please sign in to comment.