{"record":{"id":"be3b11349bd4188c","repo":"egametang/ET","slug":"not-found-handler-message-be3b11","errorCode":null,"errorMessage":"not found handler: {message}","messagePattern":"not found handler: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"Packages/cn.etetet.login/Scripts/Hotfix/Client/NetClient/NetComponentOnReadInvoker_NetClient.cs","lineNumber":36,"sourceCode":"                {\n                    session.OnResponse(response);\n                    break;\n                }\n                case ISessionMessage:\n                {\n                    MessageSessionDispatcher.Instance.Handle(session, message);\n                    break;\n                }\n                case IMessage iActorMessage:\n                {\n                    // 扔到Main纤程队列中\n                    long parentFiberId = fiber.Root.GetComponent<FiberParentComponent>().ParentFiberId;\n                    fiber.Root.GetComponent<ProcessInnerSender>().Send(new FiberInstanceId(parentFiberId), iActorMessage);\n                    break;\n                }\n                default:\n                {\n                    throw new Exception($\"not found handler: {message}\");\n                }\n            }\n        }\n    }\n}\n","sourceCodeStart":18,"sourceCodeEnd":42,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.login/Scripts/Hotfix/Client/NetClient/NetComponentOnReadInvoker_NetClient.cs#L18-L42","documentation":"Thrown by the NetClient message dispatcher (NetComponentOnReadInvoker_NetClient) when an incoming message does not match ISessionRequest/ISessionMessage (dispatched via MessageSessionDispatcher) or IMessage (forwarded to the parent fiber via ProcessInnerSender). Any message type outside these interfaces hits the default throw.","triggerScenarios":"A message is received on the NetClient session that implements neither ISessionRequest, ISessionMessage, nor IMessage. This means the message protocol type is unrecognized by the NetClient dispatcher's switch.","commonSituations":"Client and server message definitions are out of sync — a new message type was added on one side without updating the other. A message was routed to the NetClient scene that belongs to a different scene type. A raw/binary message arrived without a proper message interface.","solutions":["Identify the message type from the error and add the appropriate case or ensure it implements one of the known interfaces (ISessionRequest, ISessionMessage, IMessage).","Verify client and server share the same message protocol definitions and both are rebuilt.","Check that the message is being sent to the correct scene/connection type."],"exampleFix":"// before: unknown message type hits default throw\ndefault:\n    throw new Exception($\"not found handler: {message}\");\n// after: log and skip instead of crashing, or add the missing case\ndefault:\n    Log.Error($\"not found handler: {message}\");\n    break;","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { HandleMessage(session, message); } catch (Exception e) { Log.Error($\"NetClient dispatch failed for {message?.GetType().Name}: {e}\"); }","preventionTips":["Ensure all expected message types implement ISessionRequest, ISessionMessage, or IMessage.","Keep client and server message protocol definitions in sync — rebuild both when messages change.","Log unrecognized message types instead of crashing to aid debugging in production."],"tags":["network","netclient","message-dispatch","server"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}