From 2df573afed782aebce8c020d92b42e9da7d2868e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 27 Nov 2020 09:09:31 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/controllers/graphql_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers/graphql_controller.rb') 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| -- cgit v1.2.3