Merge pull request #7970 from tchak/graphql-exception-query

feat(graphql): on api exceptions log query and variables
This commit is contained in:
LeSim 2022-10-28 12:28:32 +02:00 committed by GitHub
commit 7c90444878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,11 @@ class API::V2::GraphqlController < API::V2::BaseController
def handle_error_in_production(exception)
id = SecureRandom.uuid
Sentry.capture_exception(exception, extra: { exception_id: id })
Sentry.capture_exception(exception, extra: {
exception_id: id,
query: params[:query],
variables: params[:variables].to_json
})
render json: {
errors: [