Fix webhooks error
This commit is contained in:
@@ -47,7 +47,8 @@
|
|||||||
public function fire($eventType, $data = null) {
|
public function fire($eventType, $data = null) {
|
||||||
$startTime = microtime(true);
|
$startTime = microtime(true);
|
||||||
|
|
||||||
$request = $this->client->createRequest($this->requestMethod, $this->endpoint, [
|
$client = new \GuzzleHttp\Client();
|
||||||
|
$request = $client->createRequest($this->requestMethod, $this->endpoint, [
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'X-Cachet-Event' => $eventType,
|
'X-Cachet-Event' => $eventType,
|
||||||
],
|
],
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$response = $this->client->send($request);
|
$response = $client->send($request);
|
||||||
} catch (\GuzzleHttp\Exception\ClientException $e) {
|
} catch (\GuzzleHttp\Exception\ClientException $e) {
|
||||||
// Do nothing with the exception, we want it.
|
// Do nothing with the exception, we want it.
|
||||||
$response = $e->getResponse();
|
$response = $e->getResponse();
|
||||||
|
|||||||
Reference in New Issue
Block a user