Skip to content

Exclude noisy subgraph errors from being logged as part of "unhandled exception" logging #3745

@dnechay

Description

@dnechay

Is your feature request related to a problem? Please describe.
In web services we have a global exception filter that logs "unhandled exception". When subgraph is laggy and throws "bad indexers" error - such errors are being logged as unhandled and hence we get alerted. We can try specifying some indexer that is more stable, but it can lead to the same situation, so better would be to just ignore such errors from being logged, so we aren't alerted with this noisy error.

Errors we noticed so far:

  • bad indexers
  • 521
  • 502
  • just a fetch failed from underlying undici client in graph sdk

Describe the solution you'd like
Ideally we should have some custom error class in SDK and throw it in case subgraph request fails (e.g. SubgraphRequestFailedError), then in apps we will be able to ignore the log and return 502 just by checking error instance type.

Describe alternatives you've considered
Considered handling errors on apps directly, but that's code duplication and breaks boundaries.

Additional context

  • you can check Datadog logs e.g. for HUMAN Dashboard in order to get error examples
  • it should be implemented in all JS-based web services

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions