Skip to content

Error handling, or hook on error #5

@astj

Description

@astj

Hi.

There's no way for caller of #post to know the request to Slack succeeded or not, and I want to catch the failure (and do retry).

Currently, when posting to Slack failed, this module outputs some warning messages to console using Carp::carp.
https://github.com/masasuzu/p5-WebService-Slack-IncomingWebHook/blob/master/lib/WebService/Slack/IncomingWebHook.pm#L37-L39
But there's no way to tell caller the failure, therefore we cannot implement error handling.

So I'd like to request some features so that the caller can catch the failure.
For example, if #post returns $res, which is a Furl::Response and contains HTTP response informations, caller can handle failures.

Do you have any idea? and/or Would you accept Pull Requests to implement them? (If you accept, I'm willing to implement and open a pull request for them.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions