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

Recommended way to disable the error handler on a specific route #468

Closed
VincentLanglet opened this issue Mar 16, 2021 · 2 comments
Closed

Comments

@VincentLanglet
Copy link

We're using both Symfony and another Framework for our website.

Symfony is the entrypoint, and if the route is not found, it's deledated to the other framework thanks to a custom symfony route. So whenever we have an exception on the other framework, it's reported with the following meta data:

  • route: assurancevie_legacy_default_index

Is there a way to ignore this route ?
I can add some code in this specific controller if needed.

@Jean85
Copy link
Contributor

Jean85 commented Mar 17, 2021

If not sending error is enough, there are a couple of ways to do it, like using the before_send callback and intercepting anything pertaining to that route.

If your issue is the handler itself instead, because maybe it's interfering with the legacy code, that would probably be more complicated... It's another instance where #337 would be the silver bullet.

Probably going through the stack of handlers and unregistering them is the only way to go.

@VincentLanglet
Copy link
Author

Yes indeed, not sending error is enough.

I tried to make getsentry/sentry-php#1201 :)

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