summaryrefslogtreecommitdiff
path: root/app/graphql/types/base_field.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/base_field.rb')
-rw-r--r--app/graphql/types/base_field.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/graphql/types/base_field.rb b/app/graphql/types/base_field.rb
index 64bc7e6474f..42c7eb6b485 100644
--- a/app/graphql/types/base_field.rb
+++ b/app/graphql/types/base_field.rb
@@ -23,12 +23,11 @@ module Types
def calls_gitaly_check(calls)
return if @calls_gitaly
+ return if calls < 1
# Will inform you if :calls_gitaly should be true or false based on the number of Gitaly calls
# involved with the request.
- if calls > 0
- raise "Gitaly is called for field '#{name}' - please add `calls_gitaly: true` to the field declaration"
- end
+ raise "Gitaly is called for field '#{name}' #{"on type #{owner.name} " if owner}- please add `calls_gitaly: true` to the field declaration"
rescue => e
Gitlab::Sentry.track_exception(e)
end