Commit d56cf9ca authored by Sean McGivern's avatar Sean McGivern

Merge branch 'bvl-remove-project-object-from-error-logging' into 'master'

Remove context from markup rendering error logging

Closes #202132

See merge request gitlab-org/gitlab!24599
parents b27767cc 329e7b48
......@@ -153,7 +153,7 @@ module MarkupHelper
other_markup_unsafe(file_name, text, context)
end
rescue StandardError => e
Gitlab::ErrorTracking.track_exception(e, project_id: @project&.id, file_name: file_name, context: context)
Gitlab::ErrorTracking.track_exception(e, project_id: @project&.id, file_name: file_name)
simple_format(text)
end
......
---
title: Don't leak entire objects into the error log when rendering markup fails
merge_request: 24599
author:
type: fixed
......@@ -403,7 +403,7 @@ describe MarkupHelper do
it 'logs the error' do
expect(Gitlab::ErrorTracking).to receive(:track_exception).with(
instance_of(StandardError),
project_id: project.id, file_name: 'foo.md', context: context
project_id: project.id, file_name: 'foo.md'
)
subject
......
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