# fangare

fangare is a module having a set of decorators letting the errors happening
during a flow run being caught and/or sent to Sentry and Slack.
Also there are several additional methods represented here, e.g. for
sending messages to Slack and getting a secrets from AWS SecretsManager.

The decorators list:
- catch_all_and_print: the decorator watches the errors during the wrapped function run
        and when they occur, it sends the error message to Sentry. Takes __sentry_dsn__ as a parameter, data source name to monitor errors.
- catch_flow_failure: works pretty much the same as the previous one, but it also initiates execution of parametrised
        function (on_failure) having corresponding on failure actions
        and also sends the error message to Sentry. Takes __sentry_dsn__ as a parameter and also __on_failure__, being a desirable on failure actions method.

Additional functions:
- get_secret: returns secret from AWS Secrets Manager using the secrets name, flow name and environment as parameters.
- sent_a_message_to_slack: sends a needed data containing message to Slack channel with specified URL. Uses _title_, _message_, _url_, _username_, _icon_emoji_, _color_ as parameters, letting totally specify the message.
