Commit 6e08050
fix: redirect to home on 401 instead of showing error boundary
When server credentials change, stale browser sessions get 401 on API calls.
Intercept all 401 responses globally and navigate to "/" so the user can
re-authenticate, rather than showing an unrecoverable "Something went wrong".
Using a never-resolving Promise prevents the SDK error from propagating to
the error boundary before navigation completes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b674c5a commit 6e08050
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
156 | 170 | | |
157 | 171 | | |
158 | 172 | | |
| |||
0 commit comments