Add try/catch around invite member overage modal
What does this MR do and why?
Related to #391943
Throwing an error from an async function doesn't get caught with then/catch method chaining. This is because it's not returning a Promise
. Instead, wrap the call in a try/catch.
Failures occurring from the invite API call resulted in the overage modal not handling the error and appearing unresponsive.
Screenshots or screen recordings
Before | After |
---|---|
before_change | after_change |
How to set up and validate locally
-To trigger the original behavior before the fix, use this patch file old_code_error.patch
-To validate with this branch, use this patch file code_fixed_forced_error.patch
- Or, if you have a QSR premium subscription with limited seats, you can just throw in
api.js
ininviteGroupMembers
inviteGroupMembers(id, data) {
throw Error(':(');
const url = Api.buildUrl(this.groupInvitationsPath).replace(':id', encodeURIComponent(id));
return axios.post(url, data);
}
- Navigate to invite group members
- Click invite members, add someone, then hit continue
- The overage modal should appear. Hit continue
- You should be kicked back to the invite modal and the input field should be highlighted in an error state
- Also smoke test inviting a group
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %15.11
1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer frontend Paulina Sedlak-Jakubowska (
@psjakubowska
) (UTC+2, 8 hours ahead of@lmeckley
)Phil Hughes (
@iamphill
) (UTC+1, 7 hours ahead of@lmeckley
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost UserBundle size analysis [beta]
This compares changes in bundle size for entry points between the commits a246eff3 and 474a3078
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.64 MB 3.64 MB - 0.0 % mainChunk 2.08 MB 2.08 MB - 0.0 %
Note: We do not have exact data for a246eff3. So we have used data from: 5b33c4e1.
The target commit was too new, so we used the latest commit from master we have info on.
It might help to rerun thebundle-size-review
job
This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.Please look at the full report for more details
Read more about how this report works.
Generated by
DangerEdited by Ghost UserAllure report
allure-report-publisher
generated test report!e2e-review-qa:
test report for 474a3078expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Plan | 49 | 0 | 1 | 0 | 50 | ✅ | | Create | 28 | 0 | 1 | 0 | 29 | ✅ | | Govern | 24 | 0 | 0 | 0 | 24 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Manage | 8 | 0 | 3 | 0 | 11 | ✅ | | Data Stores | 22 | 0 | 0 | 0 | 22 | ✅ | | Verify | 10 | 0 | 0 | 0 | 10 | ✅ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Framework sanity | 9 | 0 | 1 | 0 | 10 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 154 | 0 | 7 | 0 | 161 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
Edited by Ghost Useradded 532 commits
-
cbf17fb8...c2143a7c - 531 commits from branch
master
- 3608a248 - Add try/catch around invite member overage modal
-
cbf17fb8...c2143a7c - 531 commits from branch
requested review from @deepika.guliani
added 83 commits
-
3608a248...737983e5 - 82 commits from branch
master
- 474a3078 - Add try/catch around invite member overage modal
-
3608a248...737983e5 - 82 commits from branch
Hey @deepika.guliani, could you do an initial frontend review here?added workflowin review label and removed workflowin dev label
mentioned in issue #391943
- Resolved by Deepika Guliani
- Resolved by Phil Hughes
Thank you so much for working on this @lmeckley
Great workThis looks great
I just have a small suggestion , Back to you
assigned to @dzubova