{"record":{"id":"8792b36d795b5a7c","repo":"theforeman/foreman","slug":"unable-to-set-dns-entry","errorCode":null,"errorMessage":"Unable to set DNS entry","messagePattern":"Unable to set DNS entry","errorType":"exception","errorClass":"ProxyException","httpStatus":null,"severity":"error","filePath":"app/services/proxy_api/dns.rb","lineNumber":15,"sourceCode":"module ProxyAPI\n  class DNS < ProxyAPI::Resource\n    def initialize(args)\n      @url = args[:url] + \"/dns\"\n      super args\n    end\n\n    # Sets a DNS entry\n    # [+fqdn+] : String containing the FQDN of the host\n    # [+args+] : Hash containing :value and :type: The :fqdn key is taken from the fqdn parameter\n    # Returns  : Boolean status\n    def set(args)\n      parse post(args, \"\")\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to set DNS entry\"))\n    end\n\n    # Deletes a DNS entry\n    # [+key+] : String containing either a FQDN or a dotted quad plus .in-addr.arpa.\n    # Returns    : Boolean status\n    def delete(key)\n      parse(super(key.to_s))\n    rescue RestClient::ResourceNotFound\n      # entry doesn't exists anyway\n      true\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to delete DNS entry\"))\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/proxy_api/dns.rb#L1-L31","documentation":"Error \"Unable to set DNS entry\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/proxy_api/dns.rb:15 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":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}