{"record":{"id":"eec3d3c3690693d1","repo":"CanineHQ/canine","slug":"failed-to-register-webhook-e-message","errorCode":null,"errorMessage":"Failed to register webhook: #{e.message}","messagePattern":"Failed to register webhook: #(.+?)","errorType":"exception","errorClass":"Git::Client::Error","httpStatus":null,"severity":"error","filePath":"app/services/git/github/client.rb","lineNumber":76,"sourceCode":"    if webhook_exists?\n      return\n    end\n\n    client.create_hook(\n      repository_url,\n      \"web\",\n      {\n        url: Rails.application.routes.url_helpers.inbound_webhooks_github_index_url,\n        content_type: \"json\",\n        secret: webhook_secret\n      },\n      {\n        events: [ \"push\" ],\n        active: true\n      }\n    )\n  rescue Octokit::Error => e\n    raise Git::Client::Error, \"Failed to register webhook: #{e.message}\"\n  end\n\n  def webhook_exists?\n    webhook.present?\n  rescue Octokit::NotFound\n    false\n  end\n\n  def remove_webhook!\n    if webhook_exists?\n      client.remove_hook(repository_url, webhook.id)\n    end\n  end\n\n  def webhook\n    webhooks.find { |h| h.config.url.include?(Rails.application.routes.url_helpers.inbound_webhooks_github_index_path) }\n  end\n","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/CanineHQ/canine/blob/ba4ee3968d8513ee27d8583fbd3e854a8dd053f3/app/services/git/github/client.rb#L58-L94","documentation":"Error \"Failed to register webhook: #{e.message}\" thrown in CanineHQ/canine.","triggerScenarios":"Thrown at app/services/git/github/client.rb:76 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":"ba4ee3968d8513ee27d8583fbd3e854a8dd053f3","analyzedAt":"2026-08-23T17:49:27.834Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}