fix param handling, req.error and res.error