From e51375001785e0d0d81bc33cba8364f3f319ae8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 18 May 2021 23:10:48 +0200 Subject: [PATCH] fix wrong exception on ticket send --- app/Http/Controllers/TicketController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index 66931e0..31c9c0d 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -17,7 +17,7 @@ use App\Models\Project; use App\Models\Ticket; use App\Models\User; use Exception; -use Illuminate\Database\QueryException; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Mail; @@ -233,7 +233,7 @@ class TicketController extends Controller $user, new TicketMention($ticket, $message->message) ); - } catch (QueryException $e) { + } catch (ModelNotFoundException $e) { continue; } }