forked from cory/tildefriends
Fix a handful of errors and warnings I've seen. Gets further running in docker, now.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3773 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -60,7 +60,6 @@ function socket(request, response, client) {
|
||||
blobId = await new Database(user).get('path:' + path);
|
||||
if (!blobId) {
|
||||
response.send(JSON.stringify({action: "error", error: message.path + ' not found'}), 0x1);
|
||||
request.close();
|
||||
}
|
||||
}
|
||||
response.send(JSON.stringify({action: "session", credentials: credentials}), 0x1);
|
||||
|
@ -422,7 +422,11 @@ function receive(message) {
|
||||
} else if (message && message.action == "ping") {
|
||||
gSocket.send(JSON.stringify({action: "pong"}));
|
||||
} else if (message && message.action == "error") {
|
||||
setStatusMessage(message.error.message + '\n' + message.error.stack, '#f00', false);
|
||||
if (typeof(message.error) == 'string') {
|
||||
setStatusMessage(message.error, '#f00', false);
|
||||
} else {
|
||||
setStatusMessage(message.error.message + '\n' + message.error.stack, '#f00', false);
|
||||
}
|
||||
console.log(message.error);
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ async function loadSettings() {
|
||||
gGlobalSettings = JSON.parse(data);
|
||||
}
|
||||
} catch (error) {
|
||||
print("Error loading settings from " + kGlobalSettingsFile + ": " + error);
|
||||
print("Error loading settings from " + kGlobalSettingsFile + ":", error);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user