Back End Development and APIs Projects - Exercise Tracker

Tell us what’s happening:

Failing test cases 9-12, even my output is correct.
try{
const user = await User.findById(req.params.id);

    if(!user) {
        return res.json({message: 'User not found'})
    };

    const logs = await Exercise.find({username : user.username}, {username: 0, __v: 0});

    const formattedLogs = logs.map(exercise =>{
        return{
            description: exercise.description.toString(),
            duration: parseInt(exercise.duration),
            date: exercise.date.toDateString()
        }
    })

    return res.json({
        username: user.username,
        count: formattedLogs.length,
        log: formattedLogs
    });
}

###Your project link(s)

solution: https://3000-freecodecam-boilerplate-8vk7yapziko.ws-us117.gitpod.io

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Back End Development and APIs Projects - Exercise Tracker