Error Handling in Promises

Easy
45
1
74.3% 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.