remove newlines from the error message