I am getting an Unhandled promise rejection.
I am simply trying to await for the function insertParams to finish before calling res.send().
Here is what I have tried:
app.get('/', async (req, res) => {
    let queries = {hello: 'testing'};
    const paramResult = await insertParams(queries)
      .catch(err => {
        console.log(err);
      })
    res.send('Hello world!');
});
async function insertParams(params) {
    return db.collection('params').insertOne(params, (error, success) => {
        if (error) {
            console.log('Error: ' + error);
        }
        else {
            console.log('Success: ' + success);
        }
    })
}
The full error:
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13601) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
 
     
    