{"record":{"id":"844aee721015f298","repo":"diegosouzapw/OmniRoute","slug":"proxy-fallback-auto-selection-failed","errorCode":null,"errorMessage":"Proxy fallback auto-selection failed","messagePattern":"Proxy fallback auto-selection failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/db/settings.ts","lineNumber":770,"sourceCode":"    const fallback = await selectWorkingProxyFallback(connectionId);\n    if (fallback) {\n      // Auto-selected proxies are probed via a URL roundtrip that drops any\n      // per-registry family policy, so default the family marker to \"auto\"\n      // (no IPv6-only enforcement) when the fallback object omits it.\n      const normalizedFallback =\n        fallback.proxy && typeof fallback.proxy === \"object\"\n          ? { ...fallback, proxy: withFamilyDefault(fallback.proxy as ProxyValue) }\n          : fallback;\n      cacheProxyResolution(\n        cacheKey,\n        startGeneration,\n        startRegistryGeneration,\n        normalizedFallback as ProxyResolutionResult\n      );\n      return normalizedFallback;\n    }\n  } catch (err) {\n    console.warn({ err, connectionId }, \"Proxy fallback auto-selection failed\");\n  }\n\n  // Step 12: Return direct\n  return { proxy: null, level: \"direct\", levelId: null };\n}\n\nexport async function setProxyConfig(config: Record<string, unknown>) {\n  if (config.level !== undefined) {\n    const level = typeof config.level === \"string\" ? config.level : \"global\";\n    const id = typeof config.id === \"string\" ? config.id : null;\n    const proxy = (config.proxy as ProxyValue) || null;\n    return setProxyForLevel(level, id, proxy);\n  }\n\n  const db = getDbInstance();\n  const current = await getProxyConfig();\n  const insert = db.prepare(\n    \"INSERT OR REPLACE INTO key_value (namespace, key, value) VALUES ('proxyConfig', ?, ?)\"","sourceCodeStart":752,"sourceCodeEnd":788,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/db/settings.ts#L752-L788","documentation":"Error \"Proxy fallback auto-selection failed\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/db/settings.ts:770 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}