(path: string, err: unknown)
| 143 | } |
| 144 | |
| 145 | function wrapRouteUpgradeError(path: string, err: unknown): never { |
| 146 | if ( |
| 147 | err instanceof HttpRequestError && |
| 148 | err.status === 404 && |
| 149 | (path.startsWith('/fs/browse') || path === '/vault/select') |
| 150 | ) { |
| 151 | throw new Error( |
| 152 | 'Your ZenNotes server is running an older build and does not support the new vault picker yet. Restart `npm run dev:server` and reload the page.' |
| 153 | ) |
| 154 | } |
| 155 | throw err instanceof Error ? err : new Error(String(err)) |
| 156 | } |
| 157 | |
| 158 | async function jsonRequest<T>( |
| 159 | path: string, |
no outgoing calls
no test coverage detected