Skip to content

[Due for payment 2026-09-18] [$125] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction.  #98996

Closed

Description

@melvin-bot

Updated 2026-08-20: Corrected based on feedback from trjExpensify.

Summary
This is not a bug. During Submit onboarding, when a user tries to add a work email that is a domain-controlled login for an existing Expensify account, the AddWorkEmail request is rejected. That rejection is expected, intentional behavior for domain-controlled accounts.

What happens
Entering an email on a validated / domain-controlled corporate domain triggers AddWorkEmail, which errors out because the email is a domain-controlled login tied to an existing account. The email isn't added and no magic code is sent — which is correct for a domain-controlled account.

        if (workDomainAccountID && Domain::isValidated(db, workDomainAccountID)) {
            STHROW("401 work domain is controlled");
        }

Solution
Improve the error message copy shown to the user in this scenario to read:

Couldn’t add work email
email@domain.com is a domain controlled login for an existing Expensify account.

Reported in Slack.

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @rlinoz

Activity

  1. trjExpensify commented on Aug 20, 2026

    @trjExpensify
    Contributor
  2. trjExpensify commented on Aug 20, 2026

    @trjExpensify
    Contributor

    @MelvinBot this isn't a bug per se. The AddWorkEmail logs shows that the user hit this error which is legit for a domain controlled account.

    To that end, can you update the OP of this issue to reflect that, and the solution we'll implement is to improve the error message copy we display to the user in this scenario to read:

    Couldn’t add work email
    email@domain.com is a domain controlled login for an existing Expensify account.

  3. MelvinBot commented on Aug 20, 2026

    @MelvinBot
    Contributor

    Done — I've updated the OP to reflect that this isn't a bug: the AddWorkEmail rejection for a domain-controlled login on an existing account is expected behavior, and the agreed solution is to improve the error copy to:

    Couldn’t add work email
    email@domain.com is a domain controlled login for an existing Expensify account.

    The original diagnosis (framed around User_SignUp / ResendValidateCode) has been replaced accordingly.


    view run

  4. changed the title [-]Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-] [+][$50] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/+] on Aug 20, 2026
  5. melvin-bot commented on Aug 20, 2026

    @melvin-bot
    Author

    ⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

  6. added
    BugSomething is broken. Auto assigns a BugZero manager.
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 20, 2026
  7. melvin-bot commented on Aug 20, 2026

    @melvin-bot
    Author

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @abzokhattab (External)

  8. melvin-bot commented on Aug 20, 2026

    @melvin-bot
    Author
  9. changed the title [-][$50] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-] [+][$250] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/+] on Aug 20, 2026
  10. changed the title [-][$250] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-] [+][$50] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/+] on Aug 20, 2026
  11. melvin-bot commented on Aug 20, 2026

    @melvin-bot
    Author

    ⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

  12. 32 remaining items

  13. melvin-bot commented on Sep 17, 2026

    @melvin-bot
    Author

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  14. abzokhattab commented on Sep 18, 2026

    @abzokhattab
    Contributor

    kind reminder on #98996 (comment) @rlinoz

  15. mallenexpensify commented on Sep 22, 2026

    @mallenexpensify
    Contributor

    @rlinoz 👀 above plz.

  16. rlinoz commented on Sep 23, 2026

    @rlinoz
    Contributor

    @abzokhattab are we you with $125? It is true it got a bit more complex, but just a little.

  17. abzokhattab commented on Sep 23, 2026

    @abzokhattab
    Contributor

    @rlinoz fair enough yes

    cc @mallenexpensify

  18. changed the title [-][Due for payment 2026-09-18] [$50] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/-] [+][Due for payment 2026-09-18] [$125] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/+] on Sep 24, 2026
  19. melvin-bot commented on Sep 24, 2026

    @melvin-bot
    Author

    ⚠️ Failed to update price automatically. The BZ team member will need to update the price manually in Upwork.

  20. mallenexpensify commented on Sep 24, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @abzokhattab due $250 via NewDot

  21. quinthar commented on Sep 27, 2026

    @quinthar
    Contributor

    Approved $250 to @abzokhattab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions