Help this module is broken

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

const makeServerRequest = new Promise((resolve, reject) => {
// responseFromServer is set to false to represent an unsuccessful response from a server
let responseFromServer = false;
  
if(responseFromServer) {
  resolve("We got the data");
} else {  
  reject("Data not received");
}
});

makeServerRequest.catch(error => {
console.log(error)});
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15.

Challenge: Handle a Rejected Promise with catch

Link to the challenge:

Why do you believe it is broken? You have not changed/added any code that would help you complete the challenge.

hmmm…I see. Let me take another look at it and come back.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.