From 2eec3d625a8f1c0b06560cbdc67b0e1646d03b3c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Mon, 30 Jan 2023 10:42:57 +0100 Subject: [PATCH] Notify bugsnag on 404 errors --- app/controllers/errors_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index 7b15a8b8dc..f7173fbca3 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -4,6 +4,11 @@ class ErrorsController < ApplicationController layout "errors" def not_found + Bugsnag.notify("404") do |event| + event.severity = "info" + + event.add_metadata(:request, request.env) + end render status: :not_found end