http://keybase5btp2qikoau6u326pvotn47gb55mo6fjxxyxdoywiinomr5id.onion/blog/2014-09-17/error-handling-in-javascript
Here's the standard CoffeeScript way: get2 = (cb) -> request "https://x.io/" , (err, res, body) -> if err? then cb err else request "https://x.io/?q= #{body.hash} " , (err, res, body) -> if err? then cb err else cb null , body This is not a contrived example, it was literally the first one I thought of.