Commit 955d027e authored by Lucas Charles's avatar Lucas Charles

fix: Track and raise StoreReportService on all AR errors

Previously, only capture exceptions for `RecordInvalid` errors, but we
should track all, as we previously missed `NotNullViolation`s too

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/323221
parent 1a0afd17
......@@ -107,7 +107,7 @@ module Security
return by_find_params if by_find_params
Gitlab::ErrorTracking.track_and_raise_exception(e, find_params: find_params, uuid: finding.uuid)
rescue ActiveRecord::RecordInvalid => e
rescue ActiveRecord::ActiveRecordError => e
Gitlab::ErrorTracking.track_and_raise_exception(e, create_params: create_params&.dig(:raw_metadata))
end
end
......
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