fix: isolate public subscribe from integration job failures
Queue Weeztix/Mailwizz after the HTTP response and catch dispatch errors. Jobs log Mailwizz/Weeztix API failures without rethrowing so sync driver and terminating callbacks do not surface 500s after a successful create. Add JS fallback for non-JSON error responses, deployment note, and a regression test for failing Mailwizz under QUEUE_CONNECTION=sync. Made-with: Cursor
This commit is contained in:
@@ -47,6 +47,18 @@ class SyncSubscriberToMailwizz implements ShouldBeUnique, ShouldQueueAfterCommit
|
||||
}
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
try {
|
||||
$this->runSync();
|
||||
} catch (Throwable $e) {
|
||||
Log::error('SyncSubscriberToMailwizz: integration failed; subscriber remains local (use admin resync if needed)', [
|
||||
'subscriber_id' => $this->subscriber->id,
|
||||
'message' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
private function runSync(): void
|
||||
{
|
||||
$subscriber = Subscriber::query()
|
||||
->with(['preregistrationPage.mailwizzConfig'])
|
||||
|
||||
Reference in New Issue
Block a user