Commit 8c31a871 authored by Quang-Minh Nguyen's avatar Quang-Minh Nguyen

Remove size information from the message of ExceedLimitError

Sentry groups the events by the error classes and their messages. If a
message contains parameters, it is not added to the group.
parent 670b4fc1
......@@ -13,7 +13,7 @@ module Gitlab
@size = size
@size_limit = size_limit
super "#{@worker_class} job exceeds payload size limit (#{size}/#{size_limit})"
super "#{@worker_class} job exceeds payload size limit"
end
def sentry_extra_data
......
......@@ -22,7 +22,7 @@ RSpec.describe Gitlab::SidekiqMiddleware::SizeLimiter::ExceedLimitError do
it 'encapsulates worker info' do
exception = described_class.new(TestSizeLimiterWorker, 500, 300)
expect(exception.message).to eql("TestSizeLimiterWorker job exceeds payload size limit (500/300)")
expect(exception.message).to eql("TestSizeLimiterWorker job exceeds payload size limit")
expect(exception.worker_class).to eql(TestSizeLimiterWorker)
expect(exception.size).to be(500)
expect(exception.size_limit).to be(300)
......
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