-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
sentry errors for captcha web views and registration attempts #3761
Conversation
Your Render PR Server URL is https://social-app-pr-3761.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-coo72q7sc6pc73a8tu50. |
|
@@ -26,7 +26,7 @@ export function CaptchaWebView({ | |||
stateParam: string | |||
state?: SignupState | |||
onSuccess: (code: string) => void | |||
onError: () => void | |||
onError: (error: object) => void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not important in this particular case but in general we should get out of the habit of assuming that an error has a particular type. E.g. you technically can throw null
or throw undefined
or throw 'foo'
and it's important that this doesn't trip or break error reporting. So errors are generally unknown
maybe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yea here these do have an object
value, since they come from nativeEvent
. But for consistency sake going forward, sure lets switch to unknown
here 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm are passing the event itself? If so, does it turn into something reasonable when we stringify it later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok but test the error paths for real errors (e.g. make the iframe trigger onError
for real etc)
iframe error might not be reliable (I think onLoad will actually always fire here https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#error_and_load_event_behavior) so let's track with a few different things:
|
@gaearon Can you think of any other meaningful ways we could get an error from here, mainly on web? The Edit: Let's make that 30 seconds instead. 20 seems kind of low honestly. |
Why
We should have some more robust error reporting around signups. This adds Sentry logs to the most sensitive areas of that flow:
Test Plan
Not really sure how to test this one, aside from waiting for these to come through on Sentry. For what it's worth, we already had some of these coming through but this makes the errors a little easier to set up alerts for using the "Signup Flow Error:" prefix.