{"record":{"id":"716e0561c36ce6fc","repo":"theforeman/foreman","slug":"unable-to-initialize-proxyapi-class-s","errorCode":null,"errorMessage":"Unable to initialize ProxyAPI class %s","messagePattern":"Unable to initialize ProxyAPI class (.+?)","errorType":"exception","errorClass":"Foreman::WrappedException","httpStatus":null,"severity":"error","filePath":"app/services/proxy_status/base.rb","lineNumber":43,"sourceCode":"\n    def marshal_load(array)\n      @proxy, @cache_duration, @cache = array\n    end\n\n    protected\n\n    def api_class\n      \"ProxyAPI::#{self.class.humanized_name}\".classify.constantize\n    end\n\n    private\n\n    attr_reader :proxy, :cache_duration, :cache\n\n    def api\n      @api ||= api_class.new(:url => proxy.url)\n    rescue NameError => e\n      raise Foreman::WrappedException.new(e, N_('Unable to initialize ProxyAPI class %s'), \"ProxyAPI::#{self.class.humanized_name}\")\n    end\n\n    def fetch_proxy_data(subkey = '', &block)\n      if cache\n        Rails.cache.fetch(cache_key + subkey, :expires_in => cache_duration, &block)\n      else\n        yield\n      end\n    rescue *ProxyStatus::CONNECTION_ERRORS => exception\n      raise ::Foreman::WrappedException.new exception, N_(\"Unable to connect\")\n    end\n  end\nend\nProxyStatus.status_registry.add(ProxyStatus::Base)\n","sourceCodeStart":25,"sourceCodeEnd":58,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/proxy_status/base.rb#L25-L58","documentation":"Error \"Unable to initialize ProxyAPI class %s\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/proxy_status/base.rb:43 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"}