DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

How I make a Laravel Job to fail without restarting so I can use sentry to log the exception?

I want to be able to log exceptions into sentry but in a manner that also won't make my job to spawn like an overlord's minion.

In my multi-server application I use laravel's Queueing system in order to run background jobs. Sometimes in my logic I want to make my job to throw an exception so I can log it via a sentry using the laravel library that offers.

So in my job:

namespace App\Jobs;

use

Can you help me with that?

Top comments (0)