{"record":{"id":"749c7da2f7d1dbb3","repo":"hcengineering/platform","slug":"github-integration-is-not-configured","errorCode":null,"errorMessage":"Github integration is not configured","messagePattern":"Github integration is not configured","errorType":"error_code","errorClass":"PlatformError","httpStatus":null,"severity":"error","filePath":"services/github/github-resources/src/components/utils.ts","lineNumber":121,"sourceCode":"\nprojectQuery.query(github.mixin.GithubProject, {}, (res) => {\n  githubProjects.set(toIdMap(res))\n})\n\nconst authQuery = createQuery(true)\nexport const githubAuth = writable<GithubAuthentication | undefined>(undefined)\nauthQuery.query(github.class.GithubAuthentication, {}, (res) => {\n  githubAuth.set(res.find((it) => it.login !== ''))\n})\n\n/**\n * @public\n */\nexport async function sendGHServiceRequest (path: string, args: Record<string, any>): Promise<any> {\n  const githubURL = getMetadata(github.metadata.GithubURL)\n  if (githubURL === undefined) {\n    // We could try use recognition service to find some document properties.\n    throw new PlatformError(unknownError('Github integration is not configured'))\n  }\n  return await fetch(concatLink(concatLink(githubURL, '/api/v1/'), path), {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify(args)\n  })\n}\n","sourceCodeStart":103,"sourceCodeEnd":131,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/services/github/github-resources/src/components/utils.ts#L103-L131","documentation":"sendGHServiceRequest reads the GithubURL service metadata to locate the GitHub integration service. If the GithubURL metadata is undefined, the integration is not deployed/configured, so any GitHub service request is impossible and this unknownError PlatformError is thrown instead of making a doomed fetch.","triggerScenarios":"Calling any GitHub resource utility (sendGHServiceRequest) in an environment where the github service was never deployed or its GithubURL metadata was never registered; running locally without the GitHub integration configured.","commonSituations":"Self-hosted deployments that skipped the GitHub service setup; missing environment/configuration provisioning so metadata 'github:GithubURL' is absent; using GitHub-linked features (issue sync, PR links) before enabling the integration.","solutions":["Deploy/configure the GitHub integration service so the GithubURL metadata is registered.","Set the GitHub integration URL in the environment/service metadata (e.g. via setup/configuration tooling) and restart.","Guard feature code: check integration availability (metadata presence) before calling GitHub utilities, or catch the error and degrade gracefully."],"exampleFix":"// before\nconst data = await sendGHServiceRequest('repos', args)\n// after\nif (getMetadata(github.metadata.GithubURL) === undefined) {\n  console.warn('GitHub integration not configured, skipping')\n} else {\n  const data = await sendGHServiceRequest('repos', args)\n}","handlingStrategy":"fallback","validationCode":"import { getMetadata } from '@hcengineering/platform'\nimport { github } from '@hcengineering/github'\nconst ghConfigured = getMetadata(github.metadata.GithubURL) !== undefined","typeGuard":"function isGithubConfigured(): boolean {\n  return getMetadata(github.metadata.GithubURL) !== undefined\n}","tryCatchPattern":"try {\n  return await sendGHServiceRequest(path, args)\n} catch (err) {\n  if (err.message.includes('Github integration is not configured')) {\n    console.warn('GitHub integration unavailable, degrading gracefully')\n    return null\n  }\n  throw err\n}","preventionTips":["Add a health/startup check that verifies GithubURL metadata before enabling GitHub features.","Document the GitHub service deployment step in self-hosted setup guides.","Feature-flag GitHub-dependent code paths so they can be disabled when unconfigured."],"tags":["configuration","github","missing-service","integration"],"backgroundTag":"missing-env-var","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}