Skip to content

Commit ac8f738

Browse files
committed
Allowed it to handle it gracefully when the event is from a failed volume creation.
1 parent 85884df commit ac8f738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Management-Utilities/auto_set_fsxn_auto_grow/set_fsxn_volume_auto_grow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def lambda_handler(event, context):
138138
logging.getLogger("urllib3").setLevel(logging.WARNING)
139139
#
140140
# If this is an event from a failed call. Report that and return.
141-
if event['detail']['errorCode'] != None:
141+
if event['detail'].get('errorCode') != None:
142142
logger.warning(f"This is reporting on a error event. Error Code: {event['detail']['errorCode']}. Error Message: {event['detail']['errorMessage']}.")
143143
return
144144
#

0 commit comments

Comments
 (0)