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 (#3684)
  • Loading branch information
abhimanyubabbar authored Aug 29, 2024
1 parent 35eee4c commit 9fb463e
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 9fb463e

Please sign in to comment.