Skip to content

Commit

Permalink
Merge pull request #189 from NetApp/ckeith-patch-1
Browse files Browse the repository at this point in the history
Allowed it to handle it gracefully when the event is from a failed volume creation.
  • Loading branch information
kcantrel authored Sep 5, 2024
2 parents 2e39425 + fb42a3b commit b3ec0e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def lambda_handler(event, context):
logging.getLogger("urllib3").setLevel(logging.WARNING)
#
# If this is an event from a failed call. Report that and return.
if event['detail']['errorCode'] != None:
if event['detail'].get('errorCode') != None:
logger.warning(f"This is reporting on a error event. Error Code: {event['detail']['errorCode']}. Error Message: {event['detail']['errorMessage']}.")
return
#
Expand Down

0 comments on commit b3ec0e1

Please sign in to comment.