Skip to content

Commit

Permalink
don't report sheet not found exception
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Oct 15, 2023
1 parent 651bcbe commit 41a6f73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Utilities/Import.php
Expand Up @@ -7,6 +7,7 @@
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;

Expand Down Expand Up @@ -39,7 +40,9 @@ public static function fromExcel($class, Request $request, string $translation):
['type' => $translation]
);
} catch (Throwable $e) {
report($e);
if (! $e instanceof SheetNotFoundException) {
report($e);
}

$message = self::flashFailures($e);

Expand Down

0 comments on commit 41a6f73

Please sign in to comment.