fix(ScheduledTaskJob): replace generic Exception with NonReportableException for better error handling
This commit is contained in:
parent
ad58dfc62e
commit
b1a2938f84
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Jobs;
|
||||
|
||||
use App\Events\ScheduledTaskDone;
|
||||
use App\Exceptions\NonReportableException;
|
||||
use App\Models\Application;
|
||||
use App\Models\ScheduledTask;
|
||||
use App\Models\ScheduledTaskExecution;
|
||||
|
|
@ -120,7 +121,7 @@ public function handle(): void
|
|||
}
|
||||
|
||||
// No valid container was found.
|
||||
throw new \Exception('ScheduledTaskJob failed: No valid container was found. Is the container name correct?');
|
||||
throw new NonReportableException('ScheduledTaskJob failed: No valid container was found. Is the container name correct?');
|
||||
} catch (\Throwable $e) {
|
||||
if ($this->task_log) {
|
||||
$this->task_log->update([
|
||||
|
|
|
|||
Loading…
Reference in a new issue