[core] improve whitelist errors handling