better logging for webhooks

This commit is contained in:
David Bomba 2023-05-18 09:32:04 +10:00
parent 7099ab1c5d
commit b27c77324e
2 changed files with 2 additions and 7 deletions

View File

@ -170,9 +170,9 @@ class WebhookSingle implements ShouldQueue
}
if ($e->getResponse()->getStatusCode() >= 500) {
nlog("endpoint returned a 500, failing");
nlog("{$subscription->target_url} returned a 500, failing");
$message = "The was a problem when connecting to {$subscription->target_url} => status code ". $e->getResponse()->getStatusCode(). " no retry attempted.";
$message = "There was a problem when connecting to {$subscription->target_url} => status code ". $e->getResponse()->getStatusCode(). " no retry attempted.";
(new SystemLogger(
['message' => $message],

View File

@ -25,19 +25,14 @@ class SchedulerRepository extends BaseRepository
*/
public function save(array $data, Scheduler $scheduler): Scheduler
{
nlog($data);
$scheduler->fill($data);
$scheduler->save();
nlog($scheduler->withoutRelations()->toArray());
/** 18-5-2023 set client specific send times. */
$scheduler->calculateNextRun();
nlog($scheduler->withoutRelations()->toArray());
return $scheduler->fresh();
}
}