Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Promise error handling
// buyMangoes here will throw an Error
.then(buyMangoes, dadBranch)
// Next handler in chain
.then(eatMangoes, handleThief)
The `handleThief` function is called when buyMangoes throws an exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment