{"record":{"id":"d1f4c731816feed1","repo":"CanineHQ/canine","slug":"failed-to-register-webhook-response-body-d1f4c7","errorCode":null,"errorMessage":"Failed to register webhook: #{response.body}","messagePattern":"Failed to register webhook: #(.+?)","errorType":"exception","errorClass":"Git::Client::Error","httpStatus":null,"severity":"error","filePath":"app/services/git/gitlab/client.rb","lineNumber":115,"sourceCode":"  end\n\n  def register_webhook!\n    if webhook_exists?\n      return\n    end\n    response = HTTParty.post(\n      \"#{gitlab_api_base}/projects/#{encoded_url}/hooks\",\n      headers: { \"Authorization\" => \"Bearer #{access_token}\", \"Content-Type\" => \"application/json\" },\n      body: {\n        url: Rails.application.routes.url_helpers.inbound_webhooks_gitlab_index_url,\n        name: \"canine-webhook\",\n        push_events: true,\n        enable_ssl_verification: true,\n        token: GITLAB_WEBHOOK_SECRET\n      }.to_json\n    )\n    unless response.success?\n      raise Git::Client::Error, \"Failed to register webhook: #{response.body}\"\n    end\n    response.parsed_response\n  end\n\n  def webhooks\n    response = HTTParty.get(\n      \"#{gitlab_api_base}/projects/#{encoded_url}/hooks\",\n      headers: { \"Authorization\" => \"Bearer #{access_token}\" },\n      format: :json\n    )\n  end\n\n  def encoded_url\n    URI.encode_www_form_component(repository_url)\n  end\n\n  def repository\n    @repository ||= begin","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/CanineHQ/canine/blob/ba4ee3968d8513ee27d8583fbd3e854a8dd053f3/app/services/git/gitlab/client.rb#L97-L133","documentation":"Error \"Failed to register webhook: #{response.body}\" thrown in CanineHQ/canine.","triggerScenarios":"Thrown at app/services/git/gitlab/client.rb:115 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"}