Commit 1172f089 authored by Etienne Baqué's avatar Etienne Baqué

Merge branch '327599-pages-lookuppath-legacystoragedisablederror' into 'master'

Add debug info to Pages::LookupPath::LegacyStorageDisabledError

See merge request gitlab-org/gitlab!59265
parents f62fd171 1d908d7e
...@@ -72,7 +72,7 @@ module Pages ...@@ -72,7 +72,7 @@ module Pages
path: File.join(project.full_path, 'public/') path: File.join(project.full_path, 'public/')
} }
rescue LegacyStorageDisabledError => e rescue LegacyStorageDisabledError => e
Gitlab::ErrorTracking.track_exception(e) Gitlab::ErrorTracking.track_exception(e, project_id: project.id)
nil nil
end end
......
...@@ -59,7 +59,7 @@ RSpec.describe Pages::LookupPath do ...@@ -59,7 +59,7 @@ RSpec.describe Pages::LookupPath do
it 'return nil when legacy storage is disabled and there is no deployment' do it 'return nil when legacy storage is disabled and there is no deployment' do
stub_feature_flags(pages_serve_from_legacy_storage: false) stub_feature_flags(pages_serve_from_legacy_storage: false)
expect(Gitlab::ErrorTracking).to receive(:track_exception) expect(Gitlab::ErrorTracking).to receive(:track_exception)
.with(described_class::LegacyStorageDisabledError) .with(described_class::LegacyStorageDisabledError, project_id: project.id)
.and_call_original .and_call_original
expect(source).to eq(nil) expect(source).to eq(nil)
......
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