File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ io.on("connection", (socket) => {
102102 id : payload . id ,
103103 // error: `Service "${targetService}" not found`, // This was causing a crash in the client response handler because it was expecting a "data" key
104104 // data: { error: `Service "${targetService}" not found` }, // This is the correct way to handle the error - return a data object with an "error" key
105- data : {
105+ response : {
106106 error : new CustomError (
107107 "TARGET_SERVICE_NOT_FOUND" ,
108108 `Service "${ targetService } " not found` ,
@@ -130,7 +130,7 @@ io.on("connection", (socket) => {
130130
131131 if ( requestSenderSockerID ) {
132132 // Emit the response only to the requesting client
133- io . to ( requestSenderSockerID ) . emit ( "response" , { id, data : response } ) ;
133+ io . to ( requestSenderSockerID ) . emit ( "response" , { id, response } ) ;
134134 pendingRequests . delete ( id ) ; // Clean up
135135 } else {
136136 logger . warn ( `No pending request found for ID ${ id } ` ) ;
You can’t perform that action at this time.
0 commit comments