refactoring errors message