Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise error when an invalid URI is received #1019

Merged
merged 1 commit into from
Sep 5, 2016
Merged

Conversation

alexpop
Copy link
Contributor

@alexpop alexpop commented Sep 5, 2016

It changes how the audit cookbook informs the end user when an invalid Compliance Server URL is provided:

Recipe: audit::default
 * ruby_block[exchange_refresh_token] action run

   ================================================================================
   Error executing action `run` on resource 'ruby_block[exchange_refresh_token]'
   ================================================================================

   NoMethodError
   -------------
   undefined method `+' for nil:NilClass

   Cookbook Trace:
   ---------------
   /tmp/kitchen/cache/cookbooks/audit/libraries/compliance.rb:8:in `retrieve_access_token'
   /tmp/kitchen/cache/cookbooks/audit/recipes/default.rb:34:in `block (2 levels) in from_file'
   /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:78:in `run_action'
   /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block (2 levels) in converge'
   /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `each'
   /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block in converge'
   /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:105:in `converge'

to:

Recipe: audit::default
  * ruby_block[exchange_refresh_token] action run

    ================================================================================
    Error executing action `run` on resource 'ruby_block[exchange_refresh_token]'
    ================================================================================

    RuntimeError
    ------------
    Unable to parse URI: ap-cc6.opschef.tv/login

@alexpop alexpop added the Type: Bug Feature not working as expected label Sep 5, 2016
@chris-rock
Copy link
Contributor

Thanks @alexpop for this improvement

@chris-rock chris-rock merged commit 8b90af5 into master Sep 5, 2016
@chris-rock chris-rock deleted the ap/raise-invalid-uri branch September 5, 2016 14:49
@chris-rock chris-rock modified the milestone: 0.33.0 Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants