Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2b302363
Commit
2b302363
authored
Nov 07, 2019
by
allison.browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename method and use short form of constant
parent
d7910314
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
lib/gitlab/utils/deep_size.rb
lib/gitlab/utils/deep_size.rb
+1
-3
lib/sentry/client.rb
lib/sentry/client.rb
+2
-2
No files found.
lib/gitlab/utils/deep_size.rb
View file @
2b302363
...
@@ -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
...
...
lib/sentry/client.rb
View file @
2b302363
...
@@ -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
}
."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment