chore: logging

This commit is contained in:
Alexis Tyler
2021-06-23 07:59:13 +09:30
parent 51fc374975
commit 867ecabfc0

View File

@@ -103,6 +103,14 @@ export class MothershipSocket extends CustomSocket {
const logger = this.logger;
return async function (this: WebSocketWithHeartBeat, error: any) {
try {
console.log({
type: typeof error,
error,
keys: Object.keys(error),
code: error.code,
message: error.message
});
const messageParts = error.split('Unexpected server response: ');
const isHTTPError = messageParts.length !== 2;