Error Handling in Promises
Easy
35
1
70.5% Acceptance
In this lab, you will learn the basics of handling errors in promises. You will create a function called fetchData
that returns a promise. You will then use the .then()
and .catch()
methods to handle success and error scenarios respectively. Finally, you'll reject the promise with an error message.