This feels smelly.... can anyone suggest a better ...
# ask-community
t
This feels smelly.... can anyone suggest a better way to catch rnadom exceptions in your Prefect 2.0 flow?
Copy code
if __name__ == "__main__":
    try:
        flow_result = main()
    except Exception as e:
        slack_webhook_block = SlackWebhook.load("data-pipeline-notifications")
        slack_webhook_block.notify(f"{e.__class__}: {str(e)}")
1
a