intuit / simple_deploy

Maintenance Mode - Simple Deploy is an opinionated CLI tool for managing AWS Cloud Formation Stacks.
MIT License
64 stars 22 forks source link

list command swallowing errors #239

Open ghost opened 10 years ago

ghost commented 10 years ago

I was testing with a new AWS key pair and I kept getting an empty list back with the list command. I finally figured out I had fat fingered the secret key. Once fixed, I got the list of stacks back.

I would expect a bad key pair to raise an error. The empty list coming back is deceiving.

alecharmon commented 8 years ago

👋 on it!

alecharmon commented 8 years ago

@rickmendes I was looking into this and when I issued simple_deploy list -e preprod with an invalid secret key i got back /Library/Ruby/Gems/2.0.0/gems/excon-0.53.0/lib/excon/middlewares/expects.rb:7:inresponse_call': Expected(200) <=> Actual(403 Forbidden) (Excon::Error::Forbidden)` along with a traceroute, is this not what you are reffering to?

ghost commented 8 years ago

@alecharmon It is hard to remember from two years ago, but I believe my original comment meant with a bad key the list command was returning an empty list as if I had no stacks. I found that deceiving because it was not true.

Raising an exception is an improvement. What might be better is catching the exception and raising a context based message such as 'Check your AWS keys. Could not connect.'