"Request to Webtask got ESOCKETTIMEDOUT"

I’m trying to login and authenticate users using my custom database, but I keep getting “Request to Webtask got ESOCKETTIMEDOUT”.

function login(email, password, callback) {
const MongoClient = require('mongodb').MongoClient;
const bcrypt = require('bcrypt');
const uri = `mongodb+srv://${configuration.DB_USERNAME}:${configuration.DB_PASSWORD}/${configuration.DB_HOST}/${configuration.DB_NAME}?retryWrites=true`;

const client = new MongoClient(uri, { useNewUrlParser: true });

client.connect(err => {

	const collection = client.db('virtualcontrol').collection('profile_auths');

	collection.findOne({ email: email }, function (err, user) {
		if (err) return callback(err);
		if (!user) return callback(new WrongUsernameOrPasswordError(email));
    
		bcrypt.compare(password, user.password, function (err, isValid) {
		if (err || !isValid) return callback(err || new WrongUsernameOrPasswordError(email));
    
          return callback(null, {
            user_id: user._id.toString(),
            nickname: user.nickname,
            email: user.email
          });
		});
	});
  client.close();
})

}

Here is my codes

Hey there @jerac.dialino, from our previous conversation here, I have enough details to continue to investigate this challenge you are facing. I will let you know what i find out and where we can go from there. Thanks!

Hi @James.Morrison, did you find anything?

Following up @jerac.dialino, when you get a chance can you please get us a HAR file and pass it over in a direct message. Please be sure to select “Preserve log” to catch redirects and scrub the file of user passwords before passing it over. I also have linked our docs on custom Database error handling for the sake of history of context. Thanks in advance!

I wanted to add the response I left in the previous thread you are a part of relating to the same topic. Please let me know if you have any questions, thanks!