Commit 764a436
Fix generic DM create failure on chat permission 403s (#14128)
## Summary
- Handle `createChat` permission failures (`403`) by opening the
inbox-unavailable modal instead of showing a generic "Failed to create
chat" toast.
- Refresh blockers, blockees, and chat permissions before opening the
modal so the correct call-to-action (follow/unblock/learn more) is
shown.
- Keep existing generic error toast + sentry reporting behavior for
non-`403` failures.
## Files Changed
- `packages/common/src/store/pages/chat/sagas.ts`
- Added `inboxUnavailableModalActions` usage in `doCreateChat` catch
path.
- Added conditional `403` handling for single-recipient DM creates.
## Validation
- Could not run lint in this environment because `eslint` is not
installed in the workspace runtime (`sh: eslint: not found`).
- Verified patch via `git diff` and scoped logic review.
<div><a
href="https://cursor.com/agents/bc-da0e2204-854d-5c14-991a-9574848b3096"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/automations/c63aa103-66df-4558-b31d-675358e5c6a1"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/view-automation-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/view-automation-light.png"><img
alt="View Automation" width="141" height="28"
src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a> </div>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ray Jacobson <raymondjacobson@users.noreply.github.com>1 parent 4ceefa4 commit 764a436
1 file changed
Lines changed: 24 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
442 | 459 | | |
443 | | - | |
| 460 | + | |
444 | 461 | | |
445 | 462 | | |
446 | 463 | | |
| |||
0 commit comments