{"record":{"id":"f403f8508d421fe3","repo":"theforeman/foreman","slug":"unable-to-set-dhcp-entry","errorCode":null,"errorMessage":"Unable to set DHCP entry","messagePattern":"Unable to set DHCP entry","errorType":"exception","errorClass":"ProxyAPI::ProxyException","httpStatus":null,"severity":"error","filePath":"app/services/proxy_api/dhcp.rb","lineNumber":89,"sourceCode":"        end\n      end\n    rescue RestClient::ResourceNotFound\n      nil\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to retrieve DHCP entry for %s\"), ip)\n    end\n\n    # Sets a DHCP entry\n    # [+subnet+] : String in dotted decimal format\n    # [+mac+]    : String in coloned sextuplet format\n    # [+args+]   : Hash containing DHCP values. The :mac key is taken from the mac parameter\n    # Returns    : Boolean status\n    def set(subnet, args)\n      raise \"Must define a subnet\" if subnet.empty?\n      raise \"Must provide arguments\" unless args.is_a?(Hash)\n      parse(post(args, subnet.to_s))\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to set DHCP entry\"))\n    end\n\n    # Deletes a DHCP entry\n    # [+subnet+] : String in dotted decimal format\n    # [+mac+]    : String in coloned sextuplet format\n    # Returns    : Boolean status\n    def delete(subnet, mac)\n      parse super(\"#{subnet}/mac/#{mac}\")\n    rescue => e\n      raise ProxyException.new(url, e, N_(\"Unable to delete DHCP entry for %s\"), mac)\n    end\n  end\nend\n","sourceCodeStart":71,"sourceCodeEnd":103,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/proxy_api/dhcp.rb#L71-L103","documentation":"Error \"Unable to set DHCP entry\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/proxy_api/dhcp.rb:89 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"}