Simple middleware to add res.error(string) method.