Open helsont opened 8 years ago
Could you please provide a concrete use case?
Why a try
catch
would not be sufficient?
When sending a message fails it's causing laravel queues to fail even when using try catch.
I'm seeing the same thing - unless I'm implementing incorrectly.
`$settings = [ 'username' => 'XYZ', 'channel' => '#' .$integration['slack_notification_channel'], 'link_names' => true, 'unfurl_links' => true, 'unfurl_media' => true ];
$slack = new Maknz\Slack\Client('this-isnot-a-valid-webhook-url', $settings);
$copy = "testing your settings. If you see this message, everything is good to go!";
try {
$test = $slack->send($copy);
}
catch (Exception $e) {
echo $e->getMessage();
die("ERROR");
}
}
`
This code will seem to work without throwing an error and catching....
This is especially important if an error has occurred, which happens frequently when the correct channel is not specified. Right now the error is just thrown, but an error callback would be a much more graceful way of handling it.