[fix] Set error's status before assignement