Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created April 7, 2025 17:19
Show Gist options
  • Select an option

  • Save KyMidd/f59bcef49a23ca622f91a4e4557f7e6a to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/f59bcef49a23ca622f91a4e4557f7e6a to your computer and use it in GitHub Desktop.
def lambda_handler(event, context):
# ...
try:
# ...
except Exception as e:
print("Error processing event: %s", str(e))
# Still return 200 to Slack to prevent retries
return {
'statusCode': 200,
'body': json.dumps({'message': 'Error processing event'})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment