diff options
Diffstat (limited to 'app/services/merge_requests/base_service.rb')
-rw-r--r-- | app/services/merge_requests/base_service.rb | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/app/services/merge_requests/base_service.rb b/app/services/merge_requests/base_service.rb index aaa91548d19..7074bf5bd29 100644 --- a/app/services/merge_requests/base_service.rb +++ b/app/services/merge_requests/base_service.rb @@ -4,6 +4,7 @@ module MergeRequests class BaseService < ::IssuableBaseService extend ::Gitlab::Utils::Override include MergeRequests::AssignsMergeParams + include MergeRequests::ErrorLogger delegate :repository, to: :project @@ -260,32 +261,6 @@ module MergeRequests end end - def log_error(exception:, message:, save_message_on_model: false) - reference = merge_request.to_reference(full: true) - data = { - class: self.class.name, - message: message, - merge_request_id: merge_request.id, - merge_request: reference, - save_message_on_model: save_message_on_model - } - - if exception - Gitlab::ApplicationContext.with_context(user: current_user) do - Gitlab::ErrorTracking.track_exception(exception, data) - end - - data[:"exception.message"] = exception.message - end - - # TODO: Deprecate Gitlab::GitLogger since ErrorTracking should suffice: - # https://gitlab.com/gitlab-org/gitlab/-/issues/216379 - data[:message] = "#{self.class.name} error (#{reference}): #{message}" - Gitlab::GitLogger.error(data) - - merge_request.update(merge_error: message) if save_message_on_model - end - def trigger_merge_request_reviewers_updated(merge_request) GraphqlTriggers.merge_request_reviewers_updated(merge_request) end |