Commit 519c3e1
committed
fix: only enter hosted-static mode for window-origin targets on bootstrap failure
The catch block in beforeLoad was treating every error from
ensurePrimaryEnvironmentReady() and resolveInitialServerAuthGateState()
as a signal to enter hosted-static mode. This meant desktop and
self-hosted deployments with an explicitly configured backend would
silently degrade to an empty app shell on transient failures, instead
of showing the error page with a 'Try again' button.
Now the catch checks the primary environment target source. Only when
the target is 'window-origin' (the fallback used by the hosted app at
app.t3.codes with no backend at the origin) does it enter hosted-static
mode. For 'desktop-managed' or 'configured' targets, the error
propagates to TanStack Router's errorComponent as before.1 parent 814c206 commit 519c3e1
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
0 commit comments