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

[HOLD for payment 2023-04-26] Duplicate error messages when calling UpdateWorkspaceCustomUnit multiple times in quick succession #16347

Closed
6 tasks done
kavimuru opened this issue Mar 21, 2023 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@kavimuru
Copy link

kavimuru commented Mar 21, 2023

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


Action Performed:

  1. Go to Workspace-> Reimburse expenses (Language should be in Spanish)
  2. Change unit again and again

Expected Result:

validation message should be in Spanish language

Actual Result :

Second validation message not showing in Spanish language

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.87-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

2023-03-16.22-11-25.mp4

IMG_3713

Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1678986870330739

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0149ebb87bf4503042
  • Upwork Job ID: 1638883580841926656
  • Last Price Increase: 2023-03-23
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 21, 2023
@MelvinBot
Copy link

Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot

This comment was marked as outdated.

@kavimuru kavimuru assigned MariaHCD and unassigned abekkala Mar 21, 2023
@MariaHCD
Copy link
Contributor

Noting that the issue is reproducible even when language is set to English:

Screenshot 2023-03-23 at 4 21 38 PM

I think the real issue is that since the API calls to UpdateWorkspaceCustomUnit are being made in quick succession, this check in the API is failing

And as a result, we have two messages that convey the same error:

  1. From the failureData set in Onyx here
  2. From the API when the exception is caught here

So I think perhaps the solution here would be to improve the way we handle this error 🤔

@MariaHCD MariaHCD added the Internal Requires API changes or must be handled by Expensify staff label Mar 23, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Triggered auto assignment to Contributor Plus for review of internal employee PR - @sobitneupane (Internal)

@MariaHCD MariaHCD changed the title Second validation error message not showing in Spanish language Duplicate error messages when calling UpdateWorkspaceCustomUnit multiple times in quick succession Mar 23, 2023
@MariaHCD
Copy link
Contributor

I see two solutions here:

  1. The simplest would be to remove the error from the failureData here and just rely on the error message from the backend (we'll lose the localization here since we aren't translating backend error message just yet)
  2. Alternatively, don't send the error message from the backend (we can do that by forcing the error message in handleException to be empty via an optional param) and rely on the failureData in the frontend.

I'm personally leaning towards the former. Thoughts, @amyevans?

@melvin-bot melvin-bot bot added the Overdue label Mar 23, 2023
@amyevans
Copy link
Contributor

I like your first proposed solution best as well. I don't love that we're losing the localization though so I'm not 100% sold... cc @jasperhuangg for a third opinion please 😄

@jasperhuangg
Copy link
Contributor

I like the former as well, we're not worried about localization at the moment since that'll come later. Plus the backend error messages are more specific than the generic ones we set in the failure data in the front end.

We're going to have to figure out back end error localization at some point anyways, since we have this issue in a ton of other commands already.

@MelvinBot
Copy link

@MariaHCD, @sobitneupane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@MariaHCD
Copy link
Contributor

MariaHCD commented Apr 4, 2023

PR is still a draft because I need to test on all platforms. I'll get to that asap.

@MariaHCD
Copy link
Contributor

MariaHCD commented Apr 6, 2023

PR is out for review. Assigning a BZ member because we'll still need payment to the C+ for the PR review.

@MariaHCD MariaHCD added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Apr 6, 2023
@MelvinBot
Copy link

Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot
Copy link

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@laurenreidexpensify
Copy link
Contributor

@sobitneupane I have sent offer on Upwork for C+ work

@ayazhussain79
Copy link
Contributor

@laurenreidexpensify i identified that issue

@laurenreidexpensify
Copy link
Contributor

@ayazhussain79 job sent in Upwork!

@laurenreidexpensify
Copy link
Contributor

PR still in review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 19, 2023
@melvin-bot melvin-bot bot changed the title Duplicate error messages when calling UpdateWorkspaceCustomUnit multiple times in quick succession [HOLD for payment 2023-04-26] Duplicate error messages when calling UpdateWorkspaceCustomUnit multiple times in quick succession Apr 19, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 19, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.1-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-04-26. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@laurenreidexpensify] Determine if we should create a regression test for this bug.
  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@laurenreidexpensify laurenreidexpensify added Daily KSv2 and removed Weekly KSv2 labels Apr 26, 2023
@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Apr 26, 2023
@laurenreidexpensify
Copy link
Contributor

Everyone has been paid 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

9 participants