message: Catch and log all unexpected deluxe membership errors
diff: @@ -14,6 +14,7 @@ const challenges = require('../data/datacache').challenges
  module.exports.upgradeToDeluxe = function upgradeToDeluxe () {
  return async (req: Request, res: Response, next: NextFunction) => {
  + try {
  const user = await UserModel.findOne({ where: { id: req.body.UserId, role: security.roles.customer } })
  if (!user) {
  res.status(400).json({ status: 'error', error: 'Something went wrong. Please try again!' })
  @@ -30,7 +31,7 @@ module.exports.upgradeToDeluxe = function upgradeToDeluxe () {
  }
  if (req.body.paymentMode === 'card') {
  - const card = await CardModel.findOne({ where: { id: req.body.paymentId | -1, UserId: req.body.UserId } })
  + const card = await CardModel.findOne({ where: { id: req.body.paymentId, UserId: req.body.UserId } })
  if (!card || card.expYear < new Date().getFullYear() || (card.expYear === new Date().getFullYear() && card.expMonth - 1 < new Date().getMonth())) {
  res.status(400).json({ status: 'error', error: 'Invalid Card' })
  return
  @@ -47,6 +48,9 @@ module.exports.upgradeToDeluxe = function upgradeToDeluxe () {
  }).catch(() => {
  res.status(400).json({ status: 'error', error: 'Something went wrong. Please try again!' })
  })
  + } catch (err: unknown) {
  + res.status(400).json({ status: 'error', error: 'Something went wrong: ' + utils.getErrorMessage(err) })
  + }
  }
  }
  