Some refacto on alerts
Display errors form server