core[xavp]: fix last commit. Manage error cases properly.