hcengineering/platform · error · PlatformError

Github integration is not configured

Error message

Github integration is not configured

What it means

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.

Source

Thrown at services/github/github-resources/src/components/utils.ts:121

projectQuery.query(github.mixin.GithubProject, {}, (res) => {
  githubProjects.set(toIdMap(res))
})

const authQuery = createQuery(true)
export const githubAuth = writable<GithubAuthentication | undefined>(undefined)
authQuery.query(github.class.GithubAuthentication, {}, (res) => {
  githubAuth.set(res.find((it) => it.login !== ''))
})

/**
 * @public
 */
export async function sendGHServiceRequest (path: string, args: Record<string, any>): Promise<any> {
  const githubURL = getMetadata(github.metadata.GithubURL)
  if (githubURL === undefined) {
    // We could try use recognition service to find some document properties.
    throw new PlatformError(unknownError('Github integration is not configured'))
  }
  return await fetch(concatLink(concatLink(githubURL, '/api/v1/'), path), {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(args)
  })
}

View on GitHub (pinned to 63e28dc964)

Solutions

  1. Deploy/configure the GitHub integration service so the GithubURL metadata is registered.
  2. Set the GitHub integration URL in the environment/service metadata (e.g. via setup/configuration tooling) and restart.
  3. Guard feature code: check integration availability (metadata presence) before calling GitHub utilities, or catch the error and degrade gracefully.

Example fix

// before
const data = await sendGHServiceRequest('repos', args)
// after
if (getMetadata(github.metadata.GithubURL) === undefined) {
  console.warn('GitHub integration not configured, skipping')
} else {
  const data = await sendGHServiceRequest('repos', args)
}
Defensive patterns

Strategy: fallback

Validate before calling

import { getMetadata } from '@hcengineering/platform'
import { github } from '@hcengineering/github'
const ghConfigured = getMetadata(github.metadata.GithubURL) !== undefined

Type guard

function isGithubConfigured(): boolean {
  return getMetadata(github.metadata.GithubURL) !== undefined
}

Try / catch

try {
  return await sendGHServiceRequest(path, args)
} catch (err) {
  if (err.message.includes('Github integration is not configured')) {
    console.warn('GitHub integration unavailable, degrading gracefully')
    return null
  }
  throw err
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of hcengineering/platform@63e28dc964 (2026-08-29). Data as JSON: /api/errors/749c7da2f7d1dbb3. Report an issue: GitHub.