{"record":{"id":"dba5250859284af8","repo":"diegosouzapw/OmniRoute","slug":"failed-to-fetch-github-usage-error-message","errorCode":null,"errorMessage":"Failed to fetch GitHub usage: ${error.message}","messagePattern":"Failed to fetch GitHub usage: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/usage/fetcher.ts","lineNumber":121,"sourceCode":"        resetDate: data.limited_user_reset_date,\n        quotas: {\n          chat: {\n            used: usedQuotas.chat || 0,\n            total: monthlyQuotas.chat || 0,\n            unlimited: false,\n          },\n          completions: {\n            used: usedQuotas.completions || 0,\n            total: monthlyQuotas.completions || 0,\n            unlimited: false,\n          },\n        },\n      };\n    }\n\n    return { message: \"GitHub Copilot connected. Unable to parse quota data.\" };\n  } catch (error) {\n    throw new Error(`Failed to fetch GitHub usage: ${error.message}`);\n  }\n}\n\nfunction formatGitHubQuotaSnapshot(quota) {\n  if (!quota) return { used: 0, total: 0, unlimited: true };\n\n  return {\n    used: quota.entitlement - quota.remaining,\n    total: quota.entitlement,\n    remaining: quota.remaining,\n    unlimited: quota.unlimited || false,\n  };\n}\n\n/**\n * Proactive credit balance probe for Antigravity.\n *\n * Fires a minimal streamGenerateContent request with GOOGLE_ONE_AI credits enabled","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/usage/fetcher.ts#L103-L139","documentation":"Error \"Failed to fetch GitHub usage: ${error.message}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/usage/fetcher.ts:121 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"}