dgs-framework
dgs-framework copied to clipboard
Look for errors in the graphql response for metric tagging
Pull Request type
- [x] Bugfix
- [ ] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Other (please describe):
Changes in this PR
It's possible to manually craft a DataFetcherResult and place errors within the error field. In the previous implementation, if your datafetcher were to catch all of its own exceptions and do this manual creation of a DataFetcherResult, those requests would not properly get tagged as a request which contained an error in metrics.
This changes the implementation to inspect the actual graphql result to check if it contains errors on top of just looking for exceptions.