return error on registration failure