Skip to content
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

Wallet - Incorrect error message when entering incorrect magic code to reveal details #49050

Closed
6 tasks done
IuliiaHerets opened this issue Sep 12, 2024 · 7 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.33-1
Reproducible in staging?: Y
Reproducible in production?: N
Issue was found when executing this PR: #48953
Email or phone of affected tester (no customers): applausetester+kh090901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Account has a virtual card.
  1. Go to staging.new.expensify.com
  2. Go to Account settings > Wallet.
  3. Click on the virtual card.
  4. Click Reveal details.
  5. Enter incorrect magic code.

Expected Result:

App will show error that the magic code is incorrect.

Actual Result:

App shows the error "An error occurred while loading the card details. Please check your internet connection and try again.".

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6600612_1726117148177.bug.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @iwiznia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@melvin-bot melvin-bot bot added the Daily KSv2 label Sep 12, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 12, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@daledah
Copy link
Contributor

daledah commented Sep 12, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

App shows the error "An error occurred while loading the card details. Please check your internet connection and try again.".

What is the root cause of that problem?

In here we are comparing Json code with success code to handle invalid incorrect magic code case

But we receive JSON code 451 with this case

Screenshot 2024-09-12 at 17 08 05

What changes do you think we should make in order to solve the problem?

Add new JSON code to handle case incorrect magic code and update this logic show incorrect magic code message

if (response?.jsonCode === CONST.JSON_CODE.INVALID_CODE) {
        reject('validateCodeForm.error.incorrectMagicCode');
        return; 
}

What alternative solutions did you explore? (Optional)

@iwiznia iwiznia added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 12, 2024
@iwiznia
Copy link
Contributor

iwiznia commented Sep 12, 2024

Coming from #48953
I don't think this is a blocker, at least it's better than the previous behavior.
But also @marcaaron I am not sure we should be matching errors by message, that's what we use jsonCodes for, no?

@marcaaron
Copy link
Contributor

yeah, it was unclear to me since this is an exceptional case where we use makeRequestWithSideEffects so maybe:

  • give it a different jsonCode
  • allow it to throw
  • and handle the jsonCode

I'll try something like that - this is not a blocker.

@marcaaron
Copy link
Contributor

But we receive JSON code 451 with this case

To clarify, no, not anymore. It throws an expected error with jsonCode: 666. This issue is not happening anymore so I'm going to close it.

But maybe we still want to address this comment:

I am not sure we should be matching errors by message, that's what we use jsonCodes for, no?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants