DiederikvandenB / apollo-link-sentry

Apollo Link middleware which enriches SentryJS with GraphQL data
MIT License
123 stars 36 forks source link

Severity is undefined #432

Closed deathemperor closed 2 years ago

deathemperor commented 2 years ago

Error:

chunk-6N5EL7GV.js?v=7ce2726b:1619 Uncaught TypeError: Cannot read properties of undefined (reading 'Info')
    at severityForResult (apollo-link-sentry.js?v=7ce2726b:1519:104)
    at Object.next (apollo-link-sentry.js?v=7ce2726b:1468:36)
    at notifySubscription (chunk-STF4VR7B.js?v=7ce2726b:11629:13)
    at onNotify (chunk-STF4VR7B.js?v=7ce2726b:11673:3)
    at SubscriptionObserver2.next (chunk-STF4VR7B.js?v=7ce2726b:11729:9)
    at chunk-BJKTG7PL.js?v=7ce2726b:418:22
function severityForResult(result) {
  return result.errors && result.errors.length > 0 ? browser_1.Severity.Error : browser_1.Severity.Info;
}

It's this line: https://github.com/DiederikvandenB/apollo-link-sentry/blob/40789e2ffaf266e83c9cff9b97753b2d9cbbee11/src/SentryLink.ts#L149

JavierMartinz commented 2 years ago

It's because we need to update Sentry versions here and stop using the enum https://github.com/DiederikvandenB/apollo-link-sentry/pull/431

I didn't have time yet to fix what is failing

jayasme commented 2 years ago

the latest apollo-link-sentry is not compatible with @sentry/react-native 4.0, please fix it.

spawnia commented 2 years ago

Work on this has been started in https://github.com/DiederikvandenB/apollo-link-sentry/pull/431 but seems to have stalled. If you need this fixed you can try and create a pull request yourself.

spawnia commented 2 years ago

Fixed with https://github.com/DiederikvandenB/apollo-link-sentry/pull/431