From 549e20a57a225d964dd050dc44d5731a1a9c2e88 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 6 Sep 2017 16:45:32 +0300 Subject: [PATCH] Don't show bot errors in logs --- app/Exceptions/Handler.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 111c48340754..6aa8054d38f0 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -49,11 +49,12 @@ class Handler extends ExceptionHandler return false; } + if (Crawler::isCrawler()) { + return false; + } + // don't show these errors in the logs if ($e instanceof NotFoundHttpException) { - if (Crawler::isCrawler()) { - return false; - } // The logo can take a few seconds to get synced between servers // TODO: remove once we're using cloud storage for logos if (Utils::isNinja() && strpos(request()->url(), '/logo/') !== false) {