So far in this chapter, we've seen how to work with async functions that fulfill successfully. But, as we know, this is not always the case. We need to be able to handle errors that are thrown by asynchronous functions, or any functions they call.
In this recipe, we'll see how try-catch blocks can handle errors that are thrown by async functions.