quick refactoring of an error message