Commit adba5c4
Suppress RemoveReaction permission errors during rapid reaction toggling (#8225)
* Initial plan
* Initial plan for handling reaction permission errors
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Fix: Ignore GraphQL permission error when quickly toggling reactions
When users quickly click on a reaction to add/remove it, a race condition
can occur where the client tries to remove a reaction that the user doesn't
have permission to remove. This results in a GraphQL error:
"does not have the correct permissions to execute 'RemoveReaction'"
This change silently ignores this specific error as it's expected behavior
during rapid toggling of reactions.
Fixes microsoft/vscode#69321
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Refactor: Use consistent error handling in both toggleReaction implementations
- Import formatError in pullRequestCommentController.ts
- Use formatError(e) consistently in both implementations
- Throw new Error(errorMessage) consistently instead of rethrowing original error
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Fix message
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>1 parent e30b8f8 commit adba5c4
2 files changed
Lines changed: 28 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
557 | 568 | | |
558 | 569 | | |
559 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
988 | | - | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
989 | 996 | | |
990 | 997 | | |
991 | 998 | | |
| |||
0 commit comments