Created another example of promises throwing errors