MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / wrapRouteUpgradeError

Function wrapRouteUpgradeError

apps/web/src/bridge/http-bridge.ts:145–156  ·  view source on GitHub ↗
(path: string, err: unknown)

Source from the content-addressed store, hash-verified

143}
144
145function 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
158async function jsonRequest<T>(
159 path: string,

Callers 2

selectVaultPathFunction · 0.85
browseServerDirectoriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected