Further refactor of sg error message