amirite: return an error code