Skip to content

Bad error message when the CODECLIMATE_REPO_TOKEN is incorrect #4

@rdunlop

Description

@rdunlop

When we had the incorrect token:

bundle exec report_coverage --branch develop
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.

Downloading Result from CI Node: scp node0:~/thing/coverage/.resultset.json all_coverage/0.resultset.json
Coverage report generated for RSpec to /tmp/coverage. 1778 / 6414 LOC (27.72%) covered.
Sending report to https://codeclimate.com for branch develop... bundler: failed to load command: report_coverage (/home/ubuntu/thing/vendor/bundle/ruby/2.4.0/bin/report_coverage)
RuntimeError: HTTP Error: 401
  /home/ubuntu/thing/vendor/bundle/ruby/2.4.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/client.rb:70:in `post_results'
  /home/ubuntu/thing/vendor/bundle/ruby/2.4.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/post_results.rb:16:in `post'
  /home/ubuntu/thing/vendor/bundle/ruby/2.4.0/gems/codeclimate_circle_ci_coverage-0.2.1/lib/codeclimate_circle_ci_coverage/coverage_reporter.rb:99:in `upload_result_file'
  /home/ubuntu/thing/vendor/bundle/ruby/2.4.0/gems/codeclimate_circle_ci_coverage-0.2.1/lib/codeclimate_circle_ci_coverage/coverage_reporter.rb:46:in `run'
  /home/ubuntu/thing/vendor/bundle/ruby/2.4.0/gems/codeclimate_circle_ci_coverage-0.2.1/bin/report_coverage:17:in `<top (required)>'
  /home/ubuntu/thing/vendor/bundle/ruby/2.4.0/bin/report_coverage:22:in `load'
  /home/ubuntu/thing/vendor/bundle/ruby/2.4.0/bin/report_coverage:22:in `<top (required)>'

bundle exec report_coverage --branch develop returned exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions