-
Notifications
You must be signed in to change notification settings - Fork 205
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
MNTOR-2929 - avoid server error and add logging, with followup #4185
Conversation
@@ -96,7 +97,12 @@ export async function getUserBreaches({ | |||
export async function getSubscriberBreaches( | |||
user: Session["user"], | |||
): Promise<SubscriberBreach[]> { | |||
// FIXME this does not always return a subscriber https://mozilla-hub.atlassian.net/browse/MNTOR-2936 | |||
const subscriber = await getSubscriberByEmail(user.email); |
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.
Do we know if user.email
is always present and not the problem?
Might as well log that if not
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.
@mansaj we're logging the whole user
object below, that's exactly the sort of thing I want to check. I think we need to be more consistent in what we use for looking up users - fxa ID would be better than email I think. I have a hunch what's causing this but I want to see the data first
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.
oh sorry, i misread.. that makes sense
@@ -96,7 +97,12 @@ export async function getUserBreaches({ | |||
export async function getSubscriberBreaches( | |||
user: Session["user"], | |||
): Promise<SubscriberBreach[]> { | |||
// FIXME this does not always return a subscriber https://mozilla-hub.atlassian.net/browse/MNTOR-2936 | |||
const subscriber = await getSubscriberByEmail(user.email); |
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.
oh sorry, i misread.. that makes sense
References:
Jira: MNTOR-2929
Description
We can see from Sentry that
getSubscriberByEmail
sometimes returnsundefined
, which is causing server-side errors for some customers. Add temporary logging to diagnose, with a followup ticket filed to actually fix the problem (linked in FIXME comment).How to test
We're not sure how to reproduce this yet, this will temporarily add extra logging in production (server only).
Checklist (Definition of Done)