When the desktop app is offline, opening it fails with:
[failed_precondition] Get "https://hyper.media/vault/api/vault-email": dial tcp: lookup hyper.media: no such host
The error replaces the whole UI instead of degrading gracefully. The desktop app must be resilient to network status.
Diagnosis
The daemon wraps any GetVaultEmail failure — including the DNS error — as FailedPrecondition (backend/api/daemon/v1alpha/daemon.go).
The frontend useVaultEmail query is mounted inside AccountProfileButton in the titlebar (always rendered). It fires because the daemon still reports the remote vault as CONNECTED (cached status; it doesn't know the network is gone).
The shared QueryClient defaults are useErrorBoundary: true, retry: 4, networkMode: 'always', plus onlineManager.setOnline(true) in root.tsx. React Query retries 4 times, then throws into React.
The throw hits the app-wide RootAppError ErrorBoundary in root.tsx, so the entire UI is replaced by the error screen.
Nearby non-critical queries (useVaultStatus, useDaemonInfo) already opt out with useErrorBoundary: false; useVaultEmail and useVaultPasswordStatus were missing it.
Proposal
[DONE] Stop throwing non-critical query errors into the app-wide error boundary. Added useErrorBoundary: false to useVaultEmail and useVaultPasswordStatus (frontend/apps/desktop/src/models/daemon.ts), so a failed vault request now leaves the query in isError state instead of crashing the app. Implemented in PR #1403.
Quieter offline behavior. Today the app forces onlineManager.setOnline(true) and networkMode: 'always', so offline users still get 4 retries plus a global "Failed to Load" toast. Options:
Gate enabled on navigator.onLine (or a connectivity signal from the daemon) for remote-only queries like vault email.
Add meta: {handlesErrorLocally: true} to suppress the global toast for queries the UI already handles, and/or surface a single "you're offline" indicator instead of per-query toasts.
Longer term: stop forcing onlineManager.setOnline(true) for remote (non-localhost) queries, so React Query pauses them automatically while offline.
Audit other remote-dependent queries for the same pattern — any query without useErrorBoundary: false that hits a remote endpoint can crash the whole app the same way.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime