diff options
author | Adam Leff <adam@leff.co> | 2016-07-05 14:20:20 -0400 |
---|---|---|
committer | Adam Leff <adam@leff.co> | 2016-07-05 14:20:20 -0400 |
commit | 9cafaa5c68ac987cb7498eef0a413cb8b823b650 (patch) | |
tree | 5c66781356d188c1936881e17c86d5b01384db46 /lib/chef/data_collector.rb | |
parent | 1e70e7912bcc23a53673a69bf411b607d4085eff (diff) | |
download | chef-9cafaa5c68ac987cb7498eef0a413cb8b823b650.tar.gz |
Updates to end-user error messages based on PR feedbackadamleff/ipo-277-uri-validation
Diffstat (limited to 'lib/chef/data_collector.rb')
-rw-r--r-- | lib/chef/data_collector.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/data_collector.rb b/lib/chef/data_collector.rb index ffdba99351..dbb0b3771a 100644 --- a/lib/chef/data_collector.rb +++ b/lib/chef/data_collector.rb @@ -382,16 +382,16 @@ class Chef def validate_data_collector_server_url! raise Chef::Exceptions::ConfigurationError, - "data_collector.server_url is configured but empty. Please supply a valid URL." if data_collector_server_url.empty? + "Chef::Config[:data_collector][:server_url] is empty. Please supply a valid URL." if data_collector_server_url.empty? begin uri = URI(data_collector_server_url) rescue URI::InvalidURIError - raise Chef::Exceptions::ConfigurationError, "data_collector.server_url (#{data_collector_server_url}) is not a valid URI." + raise Chef::Exceptions::ConfigurationError, "Chef::Config[:data_collector][:server_url] (#{data_collector_server_url}) is not a valid URI." end raise Chef::Exceptions::ConfigurationError, - "data_collector.server_url (#{data_collector_server_url}) is a URI with no host. Please upply a valid URL." if uri.host.nil? + "Chef::Config[:data_collector][:server_url] (#{data_collector_server_url}) is a URI with no host. Please supply a valid URL." if uri.host.nil? end end end |