mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Make sure rules are consistent and catch more errors.
This commit is contained in:
parent
1fee2092d6
commit
6d4e45b89f
@ -94,7 +94,7 @@ class UpdateRequest extends FormRequest
|
||||
'trigger' => sprintf('in:%s', $triggers),
|
||||
'response' => sprintf('in:%s', $responses),
|
||||
'delivery' => sprintf('in:%s', $deliveries),
|
||||
'url' => ['url', 'starts_with:https://', sprintf('uniqueExistingWebhook:%d', $webhook->id)],
|
||||
'url' => ['url', sprintf('uniqueExistingWebhook:%d', $webhook->id)],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ use FireflyIII\Helpers\Webhook\SignatureGeneratorInterface;
|
||||
use FireflyIII\Models\WebhookAttempt;
|
||||
use FireflyIII\Models\WebhookMessage;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use JsonException;
|
||||
use Log;
|
||||
@ -109,7 +110,7 @@ class StandardWebhookSender implements WebhookSenderInterface
|
||||
$client = new Client();
|
||||
try {
|
||||
$res = $client->request('POST', $this->message->webhook->url, $options);
|
||||
} catch (RequestException $e) {
|
||||
} catch (RequestException|ConnectException $e) {
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user