Extended the errors so that it can come to the front end