History

log failure to fetch metadata

Zach Pomerantz committed 10 years ago

Commit c784fa41 parent aca3d4d1 file · +9 −2Browse files

Showing the changes to scripts/tutorials (1 of 1 file). Show all

Unified · Split

scripts/tutorials/getDomainMetadata.js+9−2
@@ -16,14 +16,21 @@ location.hostChanged.connect(function(host) { · 15 unmodified lines
16 16
17 // Fetch the domain ID from the metaverse17 // Fetch the domain ID from the metaverse
18 var placeData = request(SERVER + '/places/' + host);18 var placeData = request(SERVER + '/places/' + host);
19 if (!placeData) { return; }19 if (!placeData) {
20 print('Cannot find place name - abandoning metadata request for', host);
21 return;
22
23 }
20 var domainID = placeData.data.place.domain.id;24 var domainID = placeData.data.place.domain.id;
21 print('Domain ID:', domainID);25 print('Domain ID:', domainID);
22 26
23 // Fetch the domain metadata from the metaverse27 // Fetch the domain metadata from the metaverse
24 var domainData = request(SERVER + '/domains/' + domainID);28 var domainData = request(SERVER + '/domains/' + domainID);
25 print(SERVER + '/domains/' + domainID);29 print(SERVER + '/domains/' + domainID);
26 if (!domainData) { return; }30 if (!domainData) {
31 print('Cannot find domain data - abandoning metadata request for', domainID);
32 return;
33 }
27 var metadata = domainData.domain;34 var metadata = domainData.domain;
28 print('Domain metadata:', JSON.stringify(metadata));35 print('Domain metadata:', JSON.stringify(metadata));
29 36

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t