Fix API error logging
This commit is contained in:
parent
55932fb28a
commit
87ef0c56ee
|
@ -190,7 +190,7 @@ export class Session {
|
||||||
};
|
};
|
||||||
|
|
||||||
logBadMessage = (msg: any) => {
|
logBadMessage = (msg: any) => {
|
||||||
this.log(`Got malformed message from client: ${msg}`);
|
this.log(`Got malformed message from client: ${JSON.stringify(msg)}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
receive = async (event: string) => {
|
receive = async (event: string) => {
|
||||||
|
@ -202,7 +202,7 @@ export class Session {
|
||||||
try {
|
try {
|
||||||
msg = JSON.parse(event);
|
msg = JSON.parse(event);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.log(`Failed to parse message from client: ${msg}`);
|
this.log(`Failed to parse message from client: ${event}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (msg && msg.event) {
|
switch (msg && msg.event) {
|
||||||
|
|
Loading…
Reference in New Issue