Rename error() method to getError()