Skip to content

Commit b3ec0e1

Browse files
authored
Merge pull request #189 from NetApp/ckeith-patch-1
Allowed it to handle it gracefully when the event is from a failed volume creation.
2 parents 2e39425 + fb42a3b commit b3ec0e1

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)