Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.46k stars 2.81k forks source link

[$250] [Workspace Feeds] Auth RequestReplacementExpensifyCard returned an error when deactivating card #50394

Open IuliiaHerets opened 1 day ago

IuliiaHerets commented 1 day ago

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.46-1 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+kh051001@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. [Admin] Asssign a virtual card to member.
  3. [Admin] Go to Expensify Card.
  4. [Admin] Click on the member with the virtual card in Step 2.
  5. [Admin] Change the limit to 0.00
  6. [Member] Go to Wallet.
  7. [Member] Click on the Expensify Card.
  8. [Member] Click Report virtual card fraud.
  9. [Member] Click Deactivate card.

Expected Result:

The error message should be a proper error message.

Actual Result:

The error message is Auth RequestReplacementExpensifyCard returned an error.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/735968bd-64a8-44a5-87cf-0ab58089552c

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021844041896258257372
  • Upwork Job ID: 1844041896258257372
  • Last Price Increase: 2024-10-09
Issue OwnerCurrent Issue Owner: @eVoloshchak
melvin-bot[bot] commented 1 day ago

Triggered auto assignment to @slafortune (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.

IuliiaHerets commented 1 day ago

We think that this bug might be related to #wave-collect - Release 2

IuliiaHerets commented 1 day ago

@slafortune FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

Nodebrute commented 1 day ago

Edited by proposal-police: This proposal was edited at 2024-10-08 11:13:38 UTC.

Proposal

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

Auth RequestReplacementExpensifyCard returned an error when deactivating card

What is the root cause of that problem?

We are not showing generic error when a request fails https://github.com/Expensify/App/blob/867bbb47782c817fa682196394b9ee6ef217e519/src/libs/actions/Card.ts#L109-L116

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

We can add errorsErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('common.genericErrorMessage'), in failure data https://github.com/Expensify/App/blob/867bbb47782c817fa682196394b9ee6ef217e519/src/libs/actions/Card.ts#L109-L116

Alternatively, we can display a custom error message by adding it to the en.ts or es.ts file.

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 10 hours ago

Job added to Upwork: https://www.upwork.com/jobs/~021844041896258257372

melvin-bot[bot] commented 10 hours ago

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

mountiny commented 3 hours ago

This needs better error handling, when the card is deactivated we send the onyx update to remove the card, but it might take longer so the user was still able to see the card there

mountiny commented 3 hours ago

@koko57 would you be able to look as well? I can see that the updates are being queued to remove the card from Onyx, but it seems like it's not being applied correctly/ re-rendered.

I will need to look more later too