Skip to content

Commit

Permalink
Exceptions: Do not send log for MethodNotAllowedExceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Dicky Herlambang (花) <herlambangdicky5@gmail.com>
  • Loading branch information
Nicklas373 committed May 12, 2024
1 parent 89bd7c1 commit 4664b85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function render($request, Throwable $exception)
if ($route && method_exists($route, 'methods')) {
$methods = $route->methods();
$message = 'MethodNotAllowedHttpException for route: ' . $uri . ' (' . implode(', ', $methods) . ')';
NotificationHelper::Instance()->sendRouteErrNotify($uuid, 'FAIL', 'Method not allowed exception!', $currentRouteInfo, $message, $userIp);
Log::error($message);
try {
DB::table('appLogs')->insert([
'processId' => $uuid,
Expand All @@ -74,7 +74,7 @@ public function render($request, Throwable $exception)
}
} else {
$message = 'MethodNotAllowedHttpException for route: ' . $uri;
NotificationHelper::Instance()->sendRouteErrNotify($uuid, 'FAIL', 'Method not allowed exception!', 'null', $message, $userIp);
Log::error($message);
try {
DB::table('appLogs')->insert([
'processId' => $uuid,
Expand Down

0 comments on commit 4664b85

Please sign in to comment.