Handling Rejected Promises request working with or with out mongod

So I’m currently on “Handling Rejected Promises” and when I send the first “GET” request, I get a status 200 as expected. But when I turn of my mongod in my command prompt then send another “GET” request, I get the same status as before. There’s no errors or warnings what so ever.

I also tried disconnecting the MongoDB compass and I’m still not getting “UnhandledPromiseRejectWarning”.

What am I doing wrong?

Okay so I found a way to disconnect the server using “use admin”, then “db.shutdownserver” in the mongo shell, ```But now all my data in the MongoDB compass is gone! Such as customers, genres, movies, ect…
Mongo

Is there any way to get that data back???

Please help!

So I found out I can go to services to start the MongoDB server from there and gain access to all my files again. However I still haven’t figured out that mongod issue. If I shut down my server, shut off mongod, then try to get the data using Postman, I get the 500 Internal Server Error as expected. But when I turn my mongod back on, all I get are empty arrays unless I turn my server back on as well… Don’t know what else to say at this point. In the mean time, I’m just gonna move on.

I just now dealt with this issue with commenting out the mongoose.connect(), not sure whether its a good approach in your opinion but just so you know