Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

BotoServerError repr should include body #1091

Open
jimfulton opened this issue Oct 30, 2012 · 4 comments
Open

BotoServerError repr should include body #1091

jimfulton opened this issue Oct 30, 2012 · 4 comments

Comments

@jimfulton
Copy link
Contributor

I occasionally get exceptions like:

BotoServerError: 400 Bad Request

This isn't very helpful. The exception has a body that's much more informative, which
you can see if you turn logging on, but the exception repr should include it too.

@garnaat
Copy link
Member

garnaat commented Oct 30, 2012

What service are you using?

@jimfulton
Copy link
Contributor Author

CloudFormation (boto.cloudformation)

@jimfulton
Copy link
Contributor Author

Here's some more information.

BotoServerError expects the response body to be xml. If it's not xml, it sets the body to None, which wrecks the repr.

The error responses from CloudFormation are JSON (or at least some of them are).

@jamesls
Copy link
Member

jamesls commented Nov 14, 2012

#1010 has a proposed fix for this, with some ongoing discussions about how to make sure this works across all services that return JSON

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

No branches or pull requests

3 participants