chibaba/connec

Always let the client know what's going on: Return err

Closed this issue · 0 comments

connec/index.js

Line 120 in 0cdf40f

if (err) throw err;

Instead of throwing error, just return res.status(500).json({ message: 'Error logging in', error: err });