Commit 2b302363 authored by allison.browne's avatar allison.browne

Rename method and use short form of constant

parent d7910314
...@@ -26,9 +26,7 @@ module Gitlab ...@@ -26,9 +26,7 @@ module Gitlab
end end
def self.human_default_max_size def self.human_default_max_size
ActiveSupport::NumberHelper.number_to_human_size( ActiveSupport::NumberHelper.number_to_human_size(DEFAULT_MAX_SIZE)
Gitlab::Utils::DeepSize::DEFAULT_MAX_SIZE
)
end end
private private
......
...@@ -16,7 +16,7 @@ module Sentry ...@@ -16,7 +16,7 @@ module Sentry
def list_issues(issue_status:, limit:) def list_issues(issue_status:, limit:)
issues = get_issues(issue_status: issue_status, limit: limit) issues = get_issues(issue_status: issue_status, limit: limit)
check_valid_size(issues) validate_size(issues)
handle_mapping_exceptions do handle_mapping_exceptions do
map_to_errors(issues) map_to_errors(issues)
...@@ -33,7 +33,7 @@ module Sentry ...@@ -33,7 +33,7 @@ module Sentry
private private
def check_valid_size(issues) def validate_size(issues)
return if valid_size?(issues) return if valid_size?(issues)
raise Client::ResponseInvalidSizeError, "Sentry API response is too big. Limit is #{Gitlab::Utils::DeepSize.human_default_max_size}." raise Client::ResponseInvalidSizeError, "Sentry API response is too big. Limit is #{Gitlab::Utils::DeepSize.human_default_max_size}."
......
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