Commit 805e084
committed
fix(web): surface invitation errors instead of swallowing them
Both invitation responses ended in `.catch(console.error)`, so every
rejection logged to the console and rendered nothing. A refused click
looked exactly like a click that never registered — which is how a 403
presents to somebody clicking Accept.
The common case is worth naming rather than reporting generically: the
session belongs to somebody other than the invitee. Plane requires the
two to match, because an invitation is not transferable — anyone holding
the link could otherwise take the membership (GHSA-4vj8-p63v-8p24). The
toast now names both addresses, which turns a dead end into an
instruction. Anything else falls back to the server's own message.
Also adds the missing `!token` guard to accept, matching reject: without
a token the request could only ever come back 403.
Claude-Session: https://claude.ai/code/session_01XvVRm84RrH9APR25g8pFXt1 parent 7292904 commit 805e084
1 file changed
Lines changed: 36 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
48 | 76 | | |
49 | | - | |
50 | | - | |
| 77 | + | |
| 78 | + | |
51 | 79 | | |
52 | 80 | | |
53 | 81 | | |
54 | 82 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
63 | 87 | | |
64 | 88 | | |
65 | 89 | | |
| |||
69 | 93 | | |
70 | 94 | | |
71 | 95 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 96 | + | |
| 97 | + | |
76 | 98 | | |
77 | 99 | | |
78 | 100 | | |
| |||
0 commit comments