extract only reason part from error message