From 69920352ad85c131211205573222488102f05837 Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Tue, 27 Aug 2024 21:54:33 +0530 Subject: [PATCH] fix: adding a new condition for retrying the function creation in python transformation --- src/util/openfaas/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index b5021cf715..1f44df86bb 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -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`);