Commit e687e7dc authored by Thong Kuah's avatar Thong Kuah

Merge branch '35949-regression-error-tracking-page-fails-with-500' into 'master'

Fix Regression: Error Tracking page fails with 500

Closes #35949

See merge request gitlab-org/gitlab!19843
parents ffac8488 8730ad6f
...@@ -5,6 +5,10 @@ module ErrorTracking ...@@ -5,6 +5,10 @@ module ErrorTracking
DEFAULT_ISSUE_STATUS = 'unresolved' DEFAULT_ISSUE_STATUS = 'unresolved'
DEFAULT_LIMIT = 20 DEFAULT_LIMIT = 20
def external_url
project_error_tracking_setting&.sentry_external_url
end
private private
def fetch def fetch
...@@ -15,10 +19,6 @@ module ErrorTracking ...@@ -15,10 +19,6 @@ module ErrorTracking
{ issues: response[:issues] } { issues: response[:issues] }
end end
def external_url
project_error_tracking_setting&.sentry_external_url
end
def issue_status def issue_status
params[:issue_status] || DEFAULT_ISSUE_STATUS params[:issue_status] || DEFAULT_ISSUE_STATUS
end end
......
...@@ -45,4 +45,12 @@ describe ErrorTracking::ListIssuesService do ...@@ -45,4 +45,12 @@ describe ErrorTracking::ListIssuesService do
include_examples 'error tracking service unauthorized user' include_examples 'error tracking service unauthorized user'
include_examples 'error tracking service disabled' include_examples 'error tracking service disabled'
end end
describe '#external_url' do
it 'calls the project setting sentry_external_url' do
expect(error_tracking_setting).to receive(:sentry_external_url).and_return(sentry_url)
expect(subject.external_url).to eql sentry_url
end
end
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