Skip to content

Improve error reporting #54

Open
Open
@jcfr

Description

@jcfr

This would make it easier to understand the issue with failing build like this one: https://circleci.com/gh/hdmf-dev/hdmf/423
where the error was like:

Traceback (most recent call last):
  File "/home/circleci/venv/bin/githubrelease", line 11, in <module>
    sys.exit(main())
  File "/home/circleci/venv/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/circleci/venv/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/circleci/venv/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/circleci/venv/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/circleci/venv/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/circleci/venv/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/circleci/venv/lib/python3.7/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/circleci/venv/lib/python3.7/site-packages/github_release.py", line 437, in cli_release_create
    gh_release_create(*args, **kwargs)
  File "/home/circleci/venv/lib/python3.7/site-packages/github_release.py", line 116, in with_check_for_credentials
    return func(*args, **kwargs)
  File "/home/circleci/venv/lib/python3.7/site-packages/github_release.py", line 463, in gh_release_create
    response.raise_for_status()
  File "/home/circleci/venv/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.github.com/repos/hdmf-dev/hdmf/releases

In that particular case, the bot didn't have access to the repo.

Thanks @ajtritt for reporting the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions