mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix missing message call.
This commit is contained in:
parent
970193473d
commit
766418a894
@ -56,7 +56,7 @@ class StandardWebhookSender implements WebhookSenderInterface
|
|||||||
{
|
{
|
||||||
// have the signature generator generate a signature. If it fails, the error thrown will
|
// have the signature generator generate a signature. If it fails, the error thrown will
|
||||||
// end up in send() to be caught.
|
// end up in send() to be caught.
|
||||||
$signatureGenerator = app(SignatureGeneratorInterface::class);
|
$signatureGenerator = app(SignatureGeneratorInterface::class);
|
||||||
$this->message->sent = true;
|
$this->message->sent = true;
|
||||||
$this->message->save();
|
$this->message->save();
|
||||||
try {
|
try {
|
||||||
@ -109,7 +109,7 @@ class StandardWebhookSender implements WebhookSenderInterface
|
|||||||
];
|
];
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
try {
|
try {
|
||||||
$res = $client->request('POST', $this->message->webhook->url, $options);
|
$res = $client->request('POST', $this->message->webhook->url, $options);
|
||||||
} catch (RequestException|ConnectException $e) {
|
} catch (RequestException|ConnectException $e) {
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
Log::error($e->getTraceAsString());
|
Log::error($e->getTraceAsString());
|
||||||
@ -122,8 +122,11 @@ class StandardWebhookSender implements WebhookSenderInterface
|
|||||||
|
|
||||||
$attempt = new WebhookAttempt();
|
$attempt = new WebhookAttempt();
|
||||||
$attempt->webhookMessage()->associate($this->message);
|
$attempt->webhookMessage()->associate($this->message);
|
||||||
$attempt->status_code = $e->hasResponse() ? $e->getResponse()->getStatusCode() : 0;
|
$attempt->status_code = 0;
|
||||||
$attempt->logs = $logs;
|
if (method_exists($e, 'hasResponse') && method_exists($e, 'getResponse')) {
|
||||||
|
$attempt->status_code = $e->hasResponse() ? $e->getResponse()->getStatusCode() : 0;
|
||||||
|
}
|
||||||
|
$attempt->logs = $logs;
|
||||||
$attempt->save();
|
$attempt->save();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user