this should just be `raise invalid_error`