silence not found trace

pull/555/merge
Pete Matsyburka 1 month ago
parent a2598b30f7
commit 8d3f0b5b98

@ -40,7 +40,7 @@ class ErrorsController < ActionController::Base
render json: { status: error_status_code, error: }.compact, status: error_status_code
end
f.html { render error_status_code.to_s, status: error_status_code }
f.any { render error_status_code.to_s, status: error_status_code }
end
end
@ -51,7 +51,7 @@ class ErrorsController < ActionController::Base
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'
headers['Access-Control-Allow-Headers'] = '*'
headers['Access-Control-Max-Age'] = '1728000'
headers['Access-Control-Allow-Credentials'] = true
headers['Access-Control-Allow-Credentials'] = 'true'
end
def error_status_code

@ -0,0 +1,11 @@
# frozen_string_literal: true
module SilenceErrors
def log_error(request, wrapper)
return if wrapper.status_code == 404
super
end
end
ActionDispatch::DebugExceptions.prepend(SilenceErrors)
Loading…
Cancel
Save