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
1616
1717 // Fetch the domain ID from the metaverse
1818 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+ }
2024 var domainID = placeData.data.place.domain.id;
2125 print('Domain ID:', domainID);
2226
2327 // Fetch the domain metadata from the metaverse
2428 var domainData = request(SERVER + '/domains/' + domainID);
2529 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+ }
2734 var metadata = domainData.domain;
2835 print('Domain metadata:', JSON.stringify(metadata));
2936

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