I almost invariably isolate any API calls behind some kind of wrapper facade. In fact, a lot of the presentation is about exactly that: adapting Ruby's IO primitives--which can raise various exceptions, and may return a process exit status in the form of a global variable--in code that isolates their idiosyncrasies.
I'm now finding my code heading back to the old littered style whenever I have to update or get information from someone else's API just because I have to handle potential failure there and then.
Very frustrating, anyone got any insights on how they're dealing with it?