'headers' =>
$response->
getHeaders(),
'body' => \
json_decode($response->
getBody()->
getContents(), true
),
],
'responseStatusCode' =>
$response->
getStatusCode(),
'responseReasonPhrase' =>
$response->
getReasonPhrase(),
],
],
$context);
try { $this->webhookRepository->
update([ [ 'id' =>
$message->
getWebhookId(),
'errorCount' => 0,
],
],
$context);
} catch (WriteTypeIntendException
$e) { // may happen if app or webhook got deleted in the meantime,
// we don't need to update the erro-count in that case, so we can ignore the error
} } catch (\Throwable
$e) { $payload =
[ 'id' =>
$message->
getWebhookEventId(),
'deliveryStatus' => WebhookEventLogDefinition::STATUS_QUEUED, // we use the message retry mechanism to retry the message here so we set the status to queued, because it will be automatically executed again.