feat(graphql): on api exceptions log query and variables

This commit is contained in:
Paul Chavard 2022-10-28 12:15:55 +02:00
parent 3b5256c05c
commit 473a772032

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: [