Error handling in asynchronous JavaScript is quite notorious for being easy to screw up.
Regardless, I'd actually prefer Haskell's do-notation for both asynchronous commands and shell-scripting tasks. Even though Haskell isn't my favorite language, do-notation is quite nice for this.