I see 2 possible small issues with the code at:
|
result.errors.forEach(() => { |
Basically for reporting we currently iterate over the returned errors and increment the counter?
- Is this the expected behaviour? Do users want to count failed subgraph requests or individual errors returned from the graph?
- How can we split the graph based on error code for example if the shouldObserve nor fillLabelsFn have access to the returned error?
As we put all errors to the same bucket, making interpreting the errors more difficult than it needs to be. Basic use-cases would be to exclude auth errors from the rest, etc