added error handle. Also put it on the base service class so errors could automatically be added to the entity