Saturday 23 February 2019

What should happen to my application if the connection to my hosted database fails to connect?

Currently I have the server throwing database connection errors to the console for development sakes, but what should happen to the application if there was a 'no connection' situation to the hosted database? For instance, right now my Express server will just throw an error in the console(to notify me), and then keep on moving if Mongoose happens to fail connecting to MLab.I figured this is alright because the routes that are requested by the client that read/write to the database already have error handling logic inside of them that would return any database errors back to the client to handle.Anyways, just something I couldn't really put into the right words for Google. Thanks for reading!​

Submitted February 24, 2019 at 03:56AM by skidmark_zuckerberg

No comments:

Post a Comment