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

Cryptic error output if authentication with Chef Compliance fails #489

Closed
chris-rock opened this issue Feb 24, 2016 · 2 comments
Closed
Labels
Type: Enhancement Improves an existing feature

Comments

@chris-rock
Copy link
Contributor

If authentication fails with Chef Compliance (e.g. due to an outdated token), the user error message is not indicating the real issue

inspec compliance profiles               
/Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/common.rb:155:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/common.rb:155:in `new'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/common.rb:155:in `parse'
    from /Users/chartmann/Development/compliance/inspec/lib/bundles/inspec-compliance/api.rb:64:in `profiles'
    from /Users/chartmann/Development/compliance/inspec/lib/bundles/inspec-compliance/cli.rb:27:in `profiles'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/chartmann/Development/compliance/inspec/bin/inspec:166:in `<top (required)>'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/bin/inspec:23:in `load'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/bin/inspec:23:in `<main>'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/bin/ruby_executable_hooks:15:in `<main>'
@chris-rock chris-rock added the Type: Enhancement Improves an existing feature label Feb 24, 2016
@chris-rock
Copy link
Contributor Author

this may also happen, if an newer version of Chef Compliance is used #576

@chris-rock
Copy link
Contributor Author

fixed by #696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant