-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Handling TRPC errors in Sentry #14004
Comments
Assigning to @getsentry/support for routing ⏲️ |
Routing to @getsentry/product-owners-issues for triage ⏲️ |
Hi @ReneGreen27, this seems to be an SDK issue - could we please re-route this? |
Hi @MonkeeMan1, the trpc middleware currently does not support filtering your errors directly but you can do so following these docs. As for your client, simply catching and handling your errors should prevent them from hitting the error boudary. |
Environment
SaaS (https://sentry.io/)
What are you trying to accomplish?
Hello,
I have recently implemented Sentry into my webapp that uses TRPC. However, we are running into problems with Sentry displaying error pages to our users for client side errors which do not break functionality. See image below
How are you getting stuck?
An example of when this page appears is when a user tries to visit a page which requires them to be signed in.
On our protectedProcedure function we check if the user is signed in, and if they aren't we throw a TRPC unauthorized error.
This is resulting in the error below:
We are using an error boundary provided by sentry, with no props:
import { ErrorBoundary } from '@sentry/nextjs';
and wrapping that inside of our root layout.How would I go about stopping sentry from detecting these TRPC errors?
Where in the product are you?
Unknown
Link
No response
DSN
No response
Version
No response
The text was updated successfully, but these errors were encountered: