try-catch around res.json calls