Skip to content

Commit 7aa1310

Browse files
committed
Look for another string that indicates 409. Return the response to try again
1 parent 5f4e94b commit 7aa1310

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Clients/LambdaClient.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function waitUntilFunctionUpdated($function)
234234
$function = Str::beforeLast($function, ':');
235235
}
236236

237-
$this->waitUntil('FunctionUpdated', [
237+
return $this->waitUntil('FunctionUpdated', [
238238
'FunctionName' => $function,
239239
]);
240240
}
@@ -252,9 +252,10 @@ protected function addPendingRetryMiddleware()
252252
// If the request succeeded, the exception will be null.
253253
return $exception instanceof LambdaException
254254
&& $exception->getStatusCode() === 409
255-
&& Str::contains(
256-
$exception->getAwsErrorMessage(), 'The function is currently in the following state: Pending'
257-
)
255+
&& Str::contains($exception->getAwsErrorMessage(), [
256+
'The function is currently in the following state: Pending',
257+
'An update is in progress for resource: '
258+
])
258259
&& $this->waitUntilFunctionUpdated($command['FunctionName']);
259260
});
260261

0 commit comments

Comments
 (0)