econe-server errors are not properly formatted AWS-style XML
|Assignee:||Tino Vázquez||% Done:|
|Target version:||Release 2.0|
Apparently econe-server is returning response-bodies that just contain a string when something goes wrong, rather than XML which is parseable by the AWS class from amazon-ec2. AWS doesn't raise particularly informative exceptions when it just can't parse the response properly. This ends up yielding cryptic error messages from the CLI like:
econe-describe-instances: undefined method `elements' for nil:NilClass
An easy fix in econe-server.rb looks something like:
< halt 401, 'Invalid credentials'
halt 401, '<Response><Errors><Error><Code>InvalidCredentials</Code><Message>Invalid credentials</Message></Error></Errors><RequestID>0</RequestID></Response>'