From 34c59c8f4dfcb6f367c1c19a283934567cc783ae Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Tue, 19 Mar 2024 20:08:09 +0530 Subject: [PATCH] chore: Reduce RTS error log spam (#31917) We're logging the entire request/response, Axios config etc. in the logs, which isn't adding any value in troubleshooting, but is making reading logs _much_ harder. This PR will print only the essential information to logs, concisely. --- app/client/packages/rts/src/middlewares/socket-auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/packages/rts/src/middlewares/socket-auth.ts b/app/client/packages/rts/src/middlewares/socket-auth.ts index 247c714488..4dc74dd4c2 100644 --- a/app/client/packages/rts/src/middlewares/socket-auth.ts +++ b/app/client/packages/rts/src/middlewares/socket-auth.ts @@ -46,10 +46,10 @@ export async function tryAuth(socket: Socket) { } else if (error.response) { log.error( "Error response received while authentication: ", - error.response, + JSON.stringify(error.response.data), // this is so the message shows up in one line. ); } else { - log.error("Error authenticating", error); + log.error("Error authenticating", error.cause?.toString()); } return false; }