Adding error handling to slack notifications.