use req.flash() in handleError()