`error` does not exist as a method, using `raise` instead