express/database/middleware.js
// checks for first error returned by promise rejection if Mongo database suddenly disconnects
checks for first error returned by promise rejection if Mongo database suddenly disconnects
checks for first error returned by promise rejection if Mongo database suddenly disconnects
function isMongoError (error) {
return (
    typeof error === "object" &&
    error !== null &&
    error.name === "MongoNetworkError"
);
}
function isMongoError ( error ) { return ( typeof error === "object" && error !== null && error . name === "MongoNetworkError" ) ; }
checks for first error returned by promise rejection if Mongo database suddenly disconnects
checks for first error returned by promise rejection if Mongo database suddenly disconnects