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, 5 insertions, 1 deletions
diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb
index b5deed70380..1852405e7cf 100644
--- a/app/controllers/graphql_controller.rb
+++ b/app/controllers/graphql_controller.rb
@@ -37,7 +37,11 @@ class GraphqlController < ApplicationController
rescue_from StandardError do |exception|
log_exception(exception)
- render_error("Internal server error")
+ if Rails.env.test? || Rails.env.development?
+ render_error("Internal server error: #{exception.message}")
+ else
+ render_error("Internal server error")
+ end
end
rescue_from Gitlab::Graphql::Variables::Invalid do |exception|