summaryrefslogtreecommitdiff
path: root/app/controllers/graphql_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/graphql_controller.rb')
-rw-r--r--app/controllers/graphql_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb
index 5ffd525c170..942cb9beed4 100644
--- a/app/controllers/graphql_controller.rb
+++ b/app/controllers/graphql_controller.rb
@@ -70,6 +70,12 @@ class GraphqlController < ApplicationController
end
end
+ rescue_from Gitlab::Auth::TooManyIps do |exception|
+ log_exception(exception)
+
+ render_error(exception.message, status: :forbidden)
+ end
+
rescue_from Gitlab::Graphql::Variables::Invalid do |exception|
render_error(exception.message, status: :unprocessable_entity)
end