diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-13 15:12:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-13 15:12:59 +0300 |
commit | b0891151f160d287e48a5317d3152b195ef950ae (patch) | |
tree | 88070363b2f28de0dfb3b0bdf77d71e9fa228e54 /app/controllers | |
parent | 9bc96aa4f94943af9972ca7058ed31771bbcaa53 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/graphql_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index 899fa614949..f48d03869a4 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -50,6 +50,8 @@ class GraphqlController < ApplicationController end rescue_from StandardError do |exception| + @exception_object = exception + log_exception(exception) if Rails.env.test? || Rails.env.development? @@ -197,7 +199,9 @@ class GraphqlController < ApplicationController # Merging to :metadata will ensure these are logged as top level keys payload[:metadata] ||= {} - payload[:metadata].merge!(graphql: logs) + payload[:metadata][:graphql] = logs + + payload[:exception_object] = @exception_object if @exception_object end def logs |