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

How can I get additional logging on request errors? #10

Open
d3ming opened this issue Mar 1, 2016 · 2 comments
Open

How can I get additional logging on request errors? #10

d3ming opened this issue Mar 1, 2016 · 2 comments

Comments

@d3ming
Copy link

d3ming commented Mar 1, 2016

I'm trying to use the circleclient to trigger a new job, when it works fine it's great - but when it fails the error just says 400 Bad Request like below. Is there a way to get a specific error message/response from the request?

cinderblock --branch cinderblock
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/cinderblock", line 9, in <module>
    load_entry_point('cinderblock==0.0.2-1-gf73b8ce', 'console_scripts', 'cinderblock')()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/cinderblock/cinderblock.py", line 22, in main
    CINDERBLOCK_TARGET_URL=args.circle_build_url)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/circleclient/circleclient.py", line 121, in trigger
    build_parameters=build_params)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/circleclient/circleclient.py", line 67, in request
    return self.dispatch[method](url, **kwargs)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/circleclient/circleclient.py", line 54, in client_post
    status=response.status_code, reason=response.reason))
Exception: 400: Bad Request.

cinderblock --branch cinderblock returned exit code 1

CircleCI Status NOT OK Action failed: cinderblock --branch cinderblock
@d3ming
Copy link
Author

d3ming commented Mar 1, 2016

Maybe if we could log the response json on error that could help: https://github.com/qba73/circleclient/blob/develop/circleclient/circleclient.py#L54

@qba73
Copy link
Owner

qba73 commented Mar 8, 2016

Hi @d3ming. Thanks for pointing this issue. I will address this in new release. If you have a pull request I'd be happy to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants