catchError = (error, res) => {
  console.log(error)
  res.json({ mssg: 'An error occured!!' })
}
Function for outputting error created by try-catch block on express routes

@param {Error} error Error object
@param {Object} res Response object