clean error code in registration