1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
Commit graph

10 commits

Author SHA1 Message Date
James Bence
7fb0e3753e Refactor error handling
Match against the error object in both the old (against error.message)
and the new (against error.response.body); return a hash from this
method.

In the rescue block, try hard to raise an exception that includes the
code and message extracted from the error.
2013-07-02 19:39:23 -07:00
James Bence
b7b8367770 Inspect error.response.body, not error.message
Recent versions of excon have a middleware component,
Excon::Middleware::Expects and fog requests mostly record an expectation
of a 200 status code. Some calls to AWS return status other than 200 and
in some cases the error handling obscures the underlying error.

Current handling parsed error.message; this instance of error is
constructed by excon and includes the response as an attribute. The
message is always something like 'Expected(200) <=> Actual(404 Not Found)'
and so the parsing never succeeds.

Instead we now attempt to parse error.response.body which should allow
extraction of the underlying AWS Code value, which in turn will produce
an exception that points to the actual underlying cause.
2013-07-01 16:47:29 -07:00
VirtualStaticVoid
5e3ee29e58 fix for AWS error message parsing 2013-03-22 11:45:05 +02:00
Frederick Cheung
a715819976 [AWS] make beanstalk, cdn, cloudformation, cloudwatch, elasticache, elb, storage, rds, ses, sns, route53 temporary credential friendly 2012-06-20 23:26:04 +01:00
Frederick Cheung
38c75c85ab start an instance with an IAM profile and access the credentials 2012-06-20 23:17:46 +01:00
James Herdman
97b16d08d2 Remove absolute path when requiring 2012-05-26 11:27:28 -04:00
James Herdman
b8044a9942 Remove unused variable 2012-05-26 11:27:24 -04:00
Kevin Menard
dcefc2d7de Fixed #875: Loosen multi_json version. 2012-04-25 10:31:28 -04:00
George Scott
a36c3aaf67 [aws|beanstalk] Support different AWS regions. 2012-04-24 10:53:38 -07:00
George Scott
965fd66d2e New file additions for AWS Elastic Beanstalk support. 2012-03-15 17:12:30 -07:00