added missing res.error