Merge pull request #7970 from tchak/graphql-exception-query
feat(graphql): on api exceptions log query and variables
This commit is contained in:
commit
7c90444878
1 changed files with 5 additions and 1 deletions
|
@ -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: [
|
||||
|
|
Loading…
Reference in a new issue