I have tried to limit the exception reporting in work queues.
Example
The image working, but I hit an error in CallAnalyzerAction
if ($response->clientError()) {
//ray('Client error');
throw new SlimExceptions("SLIM client error {$response->status()}",
$response->status(), $response->json());
}

In the log, I see it well.
[2023-12-11 10:18:24] production.ERROR: [LOGGER][ANALYZER] call #{"id":3964,"name":"Cerdido-CM20","short_name":null,"imei":"861774050456134","sim":null,"address":"Aldea Carballal 0016","ip":null,"id_location":null,"lat":"43.608726","lon":"-8.011915","astro_clock":false,"scene":null,"manual":null,"is_astro_php":1,"sunrise_offset":null,"sunrise":"2023-12-06 07:49:07","sunrise_fallback":"2023-12-06 07:49:07","sunset_offset":null,"sunset":"2023-12-06 16:57:21","sunset_fallback":"2023-12-06 16:57:21","initialized_at":"2023-06-21 07:26:30","initialized_lums_at":null,"last_update":null,"manufacturer_id":1,"patron":null,"counter_plc":0,"town_hall_id":27,"status":0,"in_maintenance":0,"created_at":null,"updated_at":"2023-12-06 16:32:27","dl":null,"switch":null,"trafos":null,"power_gis":null,"voltage":null,"blocked":null,"checked_at":"2023-12-06 16:32:27","hw_version":null,"municipality":"Cerdido","friendly_name":null,"counter":null,"cups":"ES0022000008445699QV1P","last_streetlight_id":null,"max_power":null,"min_power":null,"observations":null,"external_charges":null,"external_changes":null,"mac":null,"geometry":null,"alerts":0,"uptime":null,"manufacturer":{"id":1,"name":"Solar Power","endpoint":"SolarPower","get_events_modem":0,"datos":null,"created_at":"2022-04-13 07:51:59","updated_at":"2022-04-13 07:51:59"}}->id ${"id":3964,"name":"Cerdido-CM20","short_name":null,"imei":"861774050456134","sim":null,"address":"Aldea Carballal 0016","ip":null,"id_location":null,"lat":"43.608726","lon":"-8.011915","astro_clock":false,"scene":null,"manual":null,"is_astro_php":1,"sunrise_offset":null,"sunrise":"2023-12-06 07:49:07","sunrise_fallback":"2023-12-06 07:49:07","sunset_offset":null,"sunset":"2023-12-06 16:57:21","sunset_fallback":"2023-12-06 16:57:21","initialized_at":"2023-06-21 07:26:30","initialized_lums_at":null,"last_update":null,"manufacturer_id":1,"patron":null,"counter_plc":0,"town_hall_id":27,"status":0,"in_maintenance":0,"created_at":null,"updated_at":"2023-12-06 16:32:27","dl":null,"switch":null,"trafos":null,"power_gis":null,"voltage":null,"blocked":null,"checked_at":"2023-12-06 16:32:27","hw_version":null,"municipality":"Cerdido","friendly_name":null,"counter":null,"cups":"ES0022000008445699QV1P","last_streetlight_id":null,"max_power":null,"min_power":null,"observations":null,"external_charges":null,"external_changes":null,"mac":null,"geometry":null,"alerts":0,"uptime":null,"manufacturer":{"id":1,"name":"Solar Power","endpoint":"SolarPower","get_events_modem":0,"datos":null,"created_at":"2022-04-13 07:51:59","updated_at":"2022-04-13 07:51:59"}}->name 2023-12-11 10:15:12 SLIM client error 400 ERROR: Modem no operativo
[2023-12-11 10:18:25] production.ERROR: [LOGGER][ANALYZER] call #4569 Camargo-CM702 2023-12-11 10:15:12 No captured exception Attempts: 2 SLIM client error 400 ERROR: Modem no operativo
[2023-12-11 10:18:25] production.ERROR: [LOGGER][ANALYZER] call #{"id":4569,"name":"Camargo-CM702","short_name":null,"imei":"861774050506961","sim":null,"address":null,"ip":null,"id_location":null,"lat":"43.420318","lon":"-3.841630","astro_clock":false,"scene":null,"manual":null,"is_astro_php":1,"sunrise_offset":null,"sunrise":"2023-12-06 07:31:49","sunrise_fallback":"2023-12-06 07:31:49","sunset_offset":null,"sunset":"2023-12-06 16:41:18","sunset_fallback":"2023-12-06 16:41:18","initialized_at":"2023-03-28 12:15:11","initialized_lums_at":null,"last_update":null,"manufacturer_id":1,"patron":null,"counter_plc":0,"town_hall_id":2,"status":0,"in_maintenance":0,"created_at":null,"updated_at":"2023-12-06 16:17:41","dl":null,"switch":null,"trafos":null,"power_gis":null,"voltage":null,"blocked":null,"checked_at":"2023-12-06 16:17:41","hw_version":null,"municipality":null,"friendly_name":null,"counter":null,"cups":null,"last_streetlight_id":null,"max_power":null,"min_power":null,"observations":null,"external_charges":null,"external_changes":null,"mac":null,"geometry":null,"alerts":0,"uptime":null,"manufacturer":{"id":1,"name":"Solar Power","endpoint":"SolarPower","get_events_modem":0,"datos":null,"created_at":"2022-04-13 07:51:59","updated_at":"2022-04-13 07:51:59"}}->id ${"id":4569,"name":"Camargo-CM702","short_name":null,"imei":"861774050506961","sim":null,"address":null,"ip":null,"id_location":null,"lat":"43.420318","lon":"-3.841630","astro_clock":false,"scene":null,"manual":null,"is_astro_php":1,"sunrise_offset":null,"sunrise":"2023-12-06 07:31:49","sunrise_fallback":"2023-12-06 07:31:49","sunset_offset":null,"sunset":"2023-12-06 16:41:18","sunset_fallback":"2023-12-06 16:41:18","initialized_at":"2023-03-28 12:15:11","initialized_lums_at":null,"last_update":null,"manufacturer_id":1,"patron":null,"counter_plc":0,"town_hall_id":2,"status":0,"in_maintenance":0,"created_at":null,"updated_at":"2023-12-06 16:17:41","dl":null,"switch":null,"trafos":null,"power_gis":null,"voltage":null,"blocked":null,"checked_at":"2023-12-06 16:17:41","hw_version":null,"municipality":null,"friendly_name":null,"counter":null,"cups":null,"last_streetlight_id":null,"max_power":null,"min_power":null,"observations":null,"external_charges":null,"external_changes":null,"mac":null,"geometry":null,"alerts":0,"uptime":null,"manufacturer":{"id":1,"name":"Solar Power","endpoint":"SolarPower","get_events_modem":0,"datos":null,"created_at":"2022-04-13 07:51:59","updated_at":"2022-04-13 07:51:59"}}->name 2023-12-11 10:15:12 SLIM client error 400 ERROR: Modem no operativo
## Job
```php
try {
CallAnalyzerAction::run(
$this->commandCenter,
$this->job_time,
$this->initial_delayed_at,
$this->debug,
$this->is_multiple,
false,
$this->tries,
$this->attempts(),
$this->key_multiple
);
} catch (Exception $e) {
$message = "{$this->message} No captured exception Attempts: {$this->attempts()} {$e->getMessage()}";
Log::error($message);
if (($this->connection == 'sync') || ($this->attempts() >= $this->tries)) {
$this->sendToElasticsearchFromJob(500, $message);
$this->fail($e->getMessage());
} else {
$this->release();
}
}
public function failed(Exception $exception): void
{
$message = "[LOGGER][ANALYZER] call #$this->commandCenter->id $$this->commandCenter->name $this->job_time "
. $exception->getMessage();
$this->sendToElasticsearchFromJob(429, $exception->getMessage());
Log::error($message);
}
protected function sendToElasticsearchFromJob(int $statusCode, string $message_log): void
{
// First update LoggerAnalyzer
Log::debug("Send to Elasticsearch Failed Job for {$this->commandCenter->id} {$this->job_time} $message_log");
$logger = LoggerAnalyzer::updateOrCreate(
[
'command_center_id' => $this->commandCenter->id,
'job' => $this->job_time,
'delayed_at' => $this->initial_delayed_at,
],
[
'status_code' => $statusCode,
'data' => json_encode([
'data' => null,
'message' => $message_log,
'success' => false,
]),
]
);
$elastic_id = $this->sendToElasticsearch($logger->id, 'analyzer');
// Update elastic_id if return OK from Elasticsearch
if (! is_null($elastic_id)) {
$logger->elastic_id = $elastic_id;
$logger->update();
}
}