phoet / asin

:books: :package: Amazon Simple INterface - Support for ItemLookup, SimilarityLookup, Search, BrowseNode and Cart Operations
http://asin.herokuapp.com/
167 stars 59 forks source link

How to gracefully handle response errors? #31

Closed SabretWoW closed 10 years ago

SabretWoW commented 10 years ago

I'm having an exceptionally difficult time handling calls that result in errors. There has to be an easy way to do this.

Could anyone please help enlighten me?

kurtfunai commented 10 years ago

Can you please elaborate? Would rescue work for this?

SabretWoW commented 10 years ago

I ended up just wrapping all my methods that make use ASIN responses with "unless resp.nil? ..."

Not the most elegant, but super simple.

Kyle

On Mon, Jan 27, 2014 at 9:15 PM, Kurt Funai notifications@github.comwrote:

Can you elaborate? Would rescue work for this?

— Reply to this email directly or view it on GitHubhttps://github.com/phoet/asin/issues/31#issuecomment-33447833 .