theforeman/foreman · error · Foreman::WrappedException

Unable to initialize ProxyAPI class %s

Error message

Unable to initialize ProxyAPI class %s

What it means

Error "Unable to initialize ProxyAPI class %s" thrown in theforeman/foreman.

Source

Thrown at app/services/proxy_status/base.rb:43

    def marshal_load(array)
      @proxy, @cache_duration, @cache = array
    end

    protected

    def api_class
      "ProxyAPI::#{self.class.humanized_name}".classify.constantize
    end

    private

    attr_reader :proxy, :cache_duration, :cache

    def api
      @api ||= api_class.new(:url => proxy.url)
    rescue NameError => e
      raise Foreman::WrappedException.new(e, N_('Unable to initialize ProxyAPI class %s'), "ProxyAPI::#{self.class.humanized_name}")
    end

    def fetch_proxy_data(subkey = '', &block)
      if cache
        Rails.cache.fetch(cache_key + subkey, :expires_in => cache_duration, &block)
      else
        yield
      end
    rescue *ProxyStatus::CONNECTION_ERRORS => exception
      raise ::Foreman::WrappedException.new exception, N_("Unable to connect")
    end
  end
end
ProxyStatus.status_registry.add(ProxyStatus::Base)

View on GitHub (pinned to 6b05625475)

When it happens

Trigger: Thrown at app/services/proxy_status/base.rb:43 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23). Data as JSON: /api/errors/716e0561c36ce6fc. Report an issue: GitHub.