Error when attempting to retrieve data from Confirmation data extension

RESOLVED FIXED

Status

Websites
Basket
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: pmac, Unassigned)

Tracking

Details

Attachments

(1 attachment)

The `utils.get_user_data` function was attempting to look for users that were not in Master_Subscribers, but were in Double_Opt_In in the Confirmation data extension using whatever info was passed to the function. When the lookup was via email, the email address was used, but the Confirmation extension does not have an EMAIL_ADDRESS_ column. This caused errors for all of these users and basket was returning a 400 error. The expected behavior is for basket to return a 200 response indicating that the user was found, but unconfirmed.

Comment 2

3 years ago
Pmac - re: "that were not in Master_Subscribers, but were in Double_Opt_In in the Confirmation data extension using whatever info was passed to the function."

Just expanding my knowledge: When/how/why would Basket look up someone in the "Confirmation" table instead of the "Double_Opt_In" table?
basket looks in the following order: Master_Subscribers (MS), Double_Opt_In, Confirmation. The following pseudo-code will hopefully make it more clear:

if user is in Master_Subscribers:
    return user

otherwise if user is in Double_Opt_In:
    # now we check in Confirmation because user was NOT in MS
    if user is in Confirmation:
        user is confirmed and awaiting the move to MS
    otherwise:
        user has not clicked on the confirmation email

otherwise:
    there is no user

Comment 4

3 years ago
Niice - thanks!

Comment 5

3 years ago
Commits pushed to master at https://github.com/mozilla/basket

https://github.com/mozilla/basket/commit/c5b18e2d526606c1799291df3d1e6170bf3b3ac0
Fix bug 1185999: Look up users in Confirmed DE properly.

https://github.com/mozilla/basket/commit/034a156c3f87ec5b8efa98f6f781b4959786adc2
Merge pull request #139 from pmclanahan/fix-look-for-user-1185999

Fix bug 1185999: Look up users in Confirmed DE properly.

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.