mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 16:10:00 +00:00
Catch and verify various errors
This commit is contained in:
@@ -73,7 +73,7 @@ class AttemptController extends Controller
|
||||
public function index(Webhook $webhook, WebhookMessage $message): JsonResponse
|
||||
{
|
||||
if ($message->webhook_id !== $webhook->id) {
|
||||
throw new FireflyException('Webhook and webhook message are no match');
|
||||
throw new FireflyException('200040: Webhook and webhook message are no match');
|
||||
}
|
||||
|
||||
$manager = $this->getManager();
|
||||
@@ -112,10 +112,10 @@ class AttemptController extends Controller
|
||||
public function show(Webhook $webhook, WebhookMessage $message, WebhookAttempt $attempt): JsonResponse
|
||||
{
|
||||
if ($message->webhook_id !== $webhook->id) {
|
||||
throw new FireflyException('Webhook and webhook message are no match');
|
||||
throw new FireflyException('200040: Webhook and webhook message are no match');
|
||||
}
|
||||
if ($attempt->webhook_message_id !== $message->id) {
|
||||
throw new FireflyException('Webhook message and webhook attempt are no match');
|
||||
throw new FireflyException('200041: Webhook message and webhook attempt are no match');
|
||||
}
|
||||
|
||||
$manager = $this->getManager();
|
||||
|
||||
Reference in New Issue
Block a user