Merge pull request #112 from thecodingmachine/debug/improve_message
More detailed error log to debug disconnect issue
This commit is contained in:
commit
cf4fa8677f
@ -6,6 +6,7 @@ export class Message {
|
|||||||
|
|
||||||
constructor(data: any) {
|
constructor(data: any) {
|
||||||
if (!data.userId || !data.roomId) {
|
if (!data.userId || !data.roomId) {
|
||||||
|
console.error("Got invalid message", data);
|
||||||
throw Error("userId or roomId cannot be null");
|
throw Error("userId or roomId cannot be null");
|
||||||
}
|
}
|
||||||
this.userId = data.userId;
|
this.userId = data.userId;
|
||||||
|
Loading…
Reference in New Issue
Block a user