Show errors and stop function.create when ClientError
The previous code checked only for one error and if some validation error occurred on AWS API then an infinite loop was happening.
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -395,6 +395,9 @@ class Function(object): | ... | @@ -395,6 +395,9 @@ class Function(object): |
395 | if 'InvalidParameterValueException' in str(e): | 395 | if 'InvalidParameterValueException' in str(e): |
396 | LOG.debug('Role is not ready, waiting') | 396 | LOG.debug('Role is not ready, waiting') |
397 | time.sleep(2) | 397 | time.sleep(2) |
398 | + else: | ||
399 | + LOG.debug(str(e)) | ||
400 | + ready = True | ||
398 | except Exception: | 401 | except Exception: |
399 | LOG.exception('Unable to upload zip file') | 402 | LOG.exception('Unable to upload zip file') |
400 | ready = True | 403 | ready = True | ... | ... |
-
Please register or login to post a comment