Error Handling in Promises

Easy
42
1
71.9% 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.