Commit 8337dfbe authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'remove-unused-missingattributeerror-handling' into 'master'

Remove unused MissingAttributeError handling

See merge request gitlab-org/gitlab!51090
parents 5235579d 840e1eab
......@@ -186,14 +186,6 @@ module Gitlab
def inject_context_for_exception(event, ex)
case ex
when ActiveModel::MissingAttributeError # Debugging for https://gitlab.com/gitlab-org/gitlab/-/issues/26751
columns_hash = ActiveRecord::Base
.connection
.schema_cache
.instance_variable_get(:@columns_hash)
.transform_values { |v| v.map(&:first) }
event.extra.merge!(columns_hash)
when ActiveRecord::StatementInvalid
event.extra[:sql] = PgQuery.normalize(ex.sql.to_s)
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment