{"record":{"id":"135eb3e0951312fd","repo":"paperclipai/paperclip","slug":"github-could-not-update-this-app-s-webhook-http","errorCode":null,"errorMessage":"GitHub could not update this App's webhook (HTTP ${response.status}). Check that the App is active and reconnect.","messagePattern":"GitHub could not update this App's webhook \\(HTTP (.+?)\\)\\. Check that the App is active and reconnect\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/chat-github-webhook-config.ts","lineNumber":736,"sourceCode":"        \"x-github-api-version\": \"2022-11-28\",\n      },\n      body: JSON.stringify({\n        url: input.webhookUrl,\n        content_type: \"json\",\n        insecure_ssl: \"0\",\n        secret: input.webhookSecret,\n      }),\n    });\n  } catch {\n    // A fetch error can embed request bodies, headers, or a proxy response.\n    // Keep it out of endpoint health, the audit log, and the board response.\n    throw new Error(\n      \"GitHub webhook configuration could not be confirmed. Reconnect to retry; repository access was not changed.\",\n    );\n  }\n  if (response.status !== 200) {\n    await response.body?.cancel().catch(() => undefined);\n    throw new Error(\n      `GitHub could not update this App's webhook (HTTP ${response.status}). Check that the App is active and reconnect.`,\n    );\n  }\n\n  // GitHub can echo a masked secret and provider error bodies are untrusted.\n  // Read a bounded response and return no provider body to callers or logs.\n  let config: Record<string, unknown>;\n  const reader = response.body?.getReader();\n  try {\n    if (!reader) throw new Error(\"Missing webhook configuration response\");\n    const chunks: Uint8Array[] = [];\n    let size = 0;\n    while (true) {\n      const chunk = await reader.read();\n      if (chunk.done) break;\n      size += chunk.value.byteLength;\n      if (size > MAX_CONFIG_RESPONSE_BYTES) {\n        throw new Error(\"Oversized webhook configuration response\");","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/chat-github-webhook-config.ts#L718-L754","documentation":"Thrown by resyncGitHubAppWebhook when GitHub responds to the webhook-update request with a non-200 HTTP status. The response body is cancelled (never read into memory) because provider error bodies are untrusted, and a generic message including only the status code is thrown. It signals GitHub itself rejected the webhook configuration update for this App.","triggerScenarios":"Any GitHub API response with status != 200 on the webhook config update endpoint: 401 when the App credentials/token are stale, 403 when the App is suspended, 404 when the webhook no longer exists on the App, 422 when the webhook payload is rejected.","commonSituations":"GitHub App suspended by an org admin; App uninstalled and reinstalled changing its webhook; expired installation/credentials; GitHub-side validation rejecting an updated URL or secret format.","solutions":["Read the HTTP status in the message: reconnect the GitHub App in the board to refresh credentials.","Check the GitHub App is active and not suspended at https://github.com/organizations/<org>/settings/apps.","If 404, verify the webhook exists on the App settings page and let the reconnect flow recreate it.","If 422, confirm the configured webhookUrl is a valid public HTTPS endpoint and webhookSecret meets GitHub requirements.","Check github.com status for ongoing incidents."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await resyncGitHubAppWebhook(input); }\ncatch (e) {\n  const m = /HTTP (\\d{3})/.exec(e.message);\n  if (m) {\n    const status = Number(m[1]);\n    if (status === 401 || status === 403) await promptReconnect();\n    else if (status >= 500) await retryLater();\n  }\n}","preventionTips":["Keep the GitHub App active and unsuspended; audit App settings periodically.","Refresh App credentials via the reconnect flow before they lapse.","Validate webhookUrl and secret formats before calling resync.","Subscribe to GitHub status updates for incident awareness."],"tags":["github","webhook","http-error","api"],"backgroundTag":"http-error-response","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}