Skip to content

Commit

Permalink
fix: return query name in Sentry (#9399)
Browse files Browse the repository at this point in the history
fix: return query name
  • Loading branch information
MounirDhahri authored Oct 10, 2023
1 parent d0a28d1 commit 2655467
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export const principalFieldErrorHandlerMiddleware = async (

// query did not have a principal field, but experienced an error, we report it to sentry and volley
if (!requestHasPrincipalField && !!res?.errors?.length) {
trackError(req.operation.operationKind, req.operation.operationKind, "default")
captureMessage(`${req.operation.operationKind} failed: ${req.operation.operationKind}`, "log")
trackError(req.operation.name, req.operation.operationKind, "default")
captureMessage(`${req.operation.operationKind} failed: ${req.operation.name}`, "log")
}

if (principalFieldWasInvolvedInError) {
trackError(req.operation.operationKind, req.operation.operationKind, "principalField")
trackError(req.operation.name, req.operation.operationKind, "principalField")
return throwError(req, res)
} else {
return res
Expand Down

0 comments on commit 2655467

Please sign in to comment.