return the error message properly