graphql-hive / graphql-hive/envelop
GraphQLError originalError prop missing on sentry addEventId
- Dominant language
- No language data
- Stars
- 827
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
Sentry Plugin `addEventId` function builds a `GraphQLError` instance missing the `originalError` prop.
https://github.com/dotansimha/envelop/blob/9449ef36f61d4d9561f88a87204b3a16f3c6f98e/packages/plugins/sentry/src/index.ts#L114-L117
This creates issues when using it togheter with `useMaskedErrors` as the default `formatError` function relies on `originalError` down the line.
https://github.com/dotansimha/envelop/blob/9449ef36f61d4d9561f88a87204b3a16f3c6f98e/packages/core/src/plugins/use-masked-errors.ts#L19-L21
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with packages/plugins/sentry/src/index.ts at lines 114-117, then read packages/core/src/plugins/use-masked-errors.ts at lines 19-21 to understand how formatError uses originalError. Done means the GraphQLError created by addEventId retains the original error information so it works correctly with useMaskedErrors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100