Commit c8c9c638 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'fix-invalid-error-tracking-method' into 'master'

Fix NoMethodError when reporting exceptions to Sentry

See merge request gitlab-org/gitlab!33260
parents 518aa48a 75b9b1b9
......@@ -28,7 +28,7 @@ module Ci
stop_actions.each do |stop_action|
stop_action.play(stop_action.user)
rescue => e
Gitlab::ErrorTracking.track_error(e, deployable_id: stop_action.id)
Gitlab::ErrorTracking.track_exception(e, deployable_id: stop_action.id)
end
end
......
---
title: Fix NoMethodError by using the correct method to report exceptions to Sentry
merge_request: 33260
author:
type: fixed
......@@ -222,8 +222,10 @@ describe Ci::StopEnvironmentsService do
it 'tracks the exception' do
expect(Gitlab::ErrorTracking)
.to receive(:track_error)
.with(Gitlab::Access::AccessDeniedError, anything).twice
.to receive(:track_exception)
.with(Gitlab::Access::AccessDeniedError, anything)
.twice
.and_call_original
subject
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