From 41a6f733783535ea25c1db190eafc7d013678596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 15 Oct 2023 16:38:23 +0300 Subject: [PATCH] don't report sheet not found exception --- app/Utilities/Import.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Utilities/Import.php b/app/Utilities/Import.php index 36277cdc5..7adf788c2 100644 --- a/app/Utilities/Import.php +++ b/app/Utilities/Import.php @@ -7,6 +7,7 @@ use App\Abstracts\ImportMultipleSheets; use App\Jobs\Auth\NotifyUser; use App\Notifications\Common\ImportCompleted; use Illuminate\Http\Request; +use Maatwebsite\Excel\Exceptions\SheetNotFoundException; use Maatwebsite\Excel\Validators\ValidationException; use Throwable; @@ -39,7 +40,9 @@ class Import ['type' => $translation] ); } catch (Throwable $e) { - report($e); + if (! $e instanceof SheetNotFoundException) { + report($e); + } $message = self::flashFailures($e);