feat(graphql): on api exceptions log query and variables
This commit is contained in:
parent
3b5256c05c
commit
473a772032
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)
|
def handle_error_in_production(exception)
|
||||||
id = SecureRandom.uuid
|
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: {
|
render json: {
|
||||||
errors: [
|
errors: [
|
||||||
|
|
Loading…
Reference in a new issue