I'm hitting this error on a discussion post with slack webhook setup. I noticed in the DB and UI it shows an error code HTTP 200, which is a success code. Not sure what that may indicate, only thing I could think of may be certificate error on the endpoint, but I don't see any indication of that error anywhere.. perhaps it is just not captured.
<br />
<b>Notice</b>: Trying to get property 'message' of non-object in <b>/flarum/vendor/reflar/webhooks/src/Adapters/Slack/SlackException.php</b> on line <b>45</b><br />
<br />
<b>Notice</b>: Trying to get property 'code' of non-object in <b>/flarum/vendor/reflar/webhooks/src/Adapters/Slack/SlackException.php</b> on line <b>45</b><br />
<br />
<b>Fatal error</b>: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in /flarum/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:24
Stack trace:
#0 /flarum/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(40): Laminas\HttpHandlerRunner\Exception\EmitterException::forOutputSent()
#1 /flarum/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(27): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput()
#2 /flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(98): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit(Object(Flarum\Api\JsonApiResponse))
#3 /flarum/vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#4 /flarum/public/index.php(26): Flarum\Http\Server->listen()
#5 {main}
thrown in <b>/flarum/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php</b> on line <b>24</b><br />
Enhancement Ideas/Requests:
It would be great to be able to setup the webhooks with a tag filter, use webhook for only [tag1, tag2, tagN]. Since I haven't got it working I don't know the exact behaviour, but I have some private areas for admins, and public for all users. I'd like to fire webhooks for actions happening in the public area, whether they be by an admin or user, but not fire webhooks for admin actions in the private admin area as these webhooks go to public spaces.
Another enhancement could be templates for these hooks, similar to the pretty mail templates, you can use the relevant event data and build your own template, so you can customize the data/layout being sent to the already supported webhook destinations.
Thanks for this much needed plugin!