catch the error

This commit is contained in:
Daniel Lugo 2020-05-31 12:02:00 -04:00
parent 56f0460509
commit f731474dce

View file

@ -1918,8 +1918,10 @@ module.exports = async (
console.log('NEWFOLLOW POSTED') console.log('NEWFOLLOW POSTED')
return res.status(200).send() return res.status(200)
} catch (err) { } catch (err) {
console.log(err)
process.exit(1)
return res.status(500).json({ return res.status(500).json({
errorMessage: err.message || 'Unknown error inside /api/gun/follow' errorMessage: err.message || 'Unknown error inside /api/gun/follow'
}) })