Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter TypeError - Load Failed by url #7275

Closed
jeengbe opened this issue Feb 23, 2023 · 5 comments
Closed

Filter TypeError - Load Failed by url #7275

jeengbe opened this issue Feb 23, 2023 · 5 comments

Comments

@jeengbe
Copy link
Contributor

jeengbe commented Feb 23, 2023

Problem Statement

With 3rd-party tracking/ads software that doesn't try-catch their queries properly, we are seeing a lot of
image
with no further stack trace attached.

Since we can't really do anything about those errors and don't want them to eat up our error quota, we block them client-side.
This only works with errors that have a stack trace to the 3rd-party SDK attached to them, which these weirdly don't. What's the best way to filter them?

(This might not be relevant, but: )
image

Solution Brainstorm

  • Can't block all "Load Failed" errors, obviously
  • Could filter by last breadcrumb URL and status, would rather not, though as it seems hackish and unstable
@Lms24
Copy link
Member

Lms24 commented Feb 24, 2023

Hi @jeengbe thanks for writing in!

That's a tricky one, I agree.

Can't block all "Load Failed" errors, obviously

I'm assuming you mean because bocking all "Load Failed" errors would also filter out your errors, not just the 3rd party ones, correct?

Generally, errors without stack traces are a very hard problem to filter out correctly. We also don't have a good solution for that. This answer explains the reason for fetch errors without stacktraces quite well. This gave me an idea you could try but I can't guarantee that this solves it better:

  1. filter our all "Load Failed" errrors
  2. use our CaptureConsole integration to capture the errors logged in the console as Sentry issues. Depending on your console output, you might need to configure additional filter rules though.

This is just an idea. Can't tell you how this performs in practice. I hope this helps a little.

@jeengbe
Copy link
Contributor Author

jeengbe commented Feb 24, 2023

I'm assuming you mean because bocking all "Load Failed" errors would also filter out your errors, not just the 3rd party ones, correct?

Yeah, exactly. Wouldn't want to ignore real errors. 😄

I'll try to filter using breadcrumbs first, will come back with some insight.

@jeengbe
Copy link
Contributor Author

jeengbe commented Feb 24, 2023

Appears to have worked. 🙂

Go through latest breadcrumbs and check if a blacklisted url has a failed request.

@jeengbe jeengbe closed this as completed Feb 24, 2023
@KevinHerklotz
Copy link

@jeengbe could you please provide a code snippet on how you do this filtering? 🙂

@jeengbe
Copy link
Contributor Author

jeengbe commented Mar 17, 2023

Hi @KevinHerklotz, sure!
See this gist: https://gist.github.com/jeengbe/4bc86f05a41a1831e6abf2369579cc7a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants