dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

Look for errors in the graphql response for metric tagging

Open jjacobs44 opened this issue 9 months ago • 0 comments

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.

jjacobs44 avatar May 22 '25 00:05 jjacobs44