aboutsummaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Main.hx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/Main.hx b/src/server/Main.hx
index 97e7ed7..6104446 100644
--- a/src/server/Main.hx
+++ b/src/server/Main.hx
@@ -12,6 +12,7 @@ import js.npm.ws.WebSocket;
import js.node.http.IncomingMessage;
import js.node.Http;
import json2object.JsonParser;
+import json2object.ErrorUtils;
import Client.ClientData;
import Types.Config;
import Types.Permission;
@@ -265,8 +266,11 @@ class Main {
ws.on("message", data -> {
final obj = wsEventParser.fromJson(data);
if (wsEventParser.errors.length > 0) {
- trace('Wrong request for type "${obj.type}":');
- trace(wsEventParser.errors.toString());
+ final line = 'Wrong request for type "${obj.type}":';
+ final errorLines = ErrorUtils.convertErrorArray(wsEventParser.errors);
+ final errors = '$line\n$errorLines';
+ trace(errors);
+ serverMessage(client, errors);
return;
}
onMessage(client, obj);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage