{"record":{"id":"842ce34f439bc1f3","repo":"egametang/ET","slug":"message-response-message-request-requesttype","errorCode":null,"errorMessage":"Message: {response.Message} Request: {requestType.FullName}","messagePattern":"Message: (.+?) Request: (.+?)","errorType":"error_code","errorClass":"RpcException","httpStatus":null,"severity":"error","filePath":"Packages/cn.etetet.actorlocation/Scripts/Hotfix/Server/MessageLocationSenderComponentSystem.cs","lineNumber":314,"sourceCode":"                        await root.TimerComponent.WaitAsync(failTimes * failTimes * 10);\n                        messageLocationSender = messageLocationSenderRef;\n                        if (messageLocationSender == null)\n                        {\n                            throw new RpcException(ErrorCode.ERR_ActorLocationSenderTimeout4, $\"{requestType.FullName}\");\n                        }\n\n                        messageLocationSender.ActorId = default;\n                        continue;\n                    }\n                    case ErrorCode.ERR_MessageTimeout:\n                    {\n                        throw new RpcException(response.Error, $\"{requestType.FullName}\");\n                    }\n                }\n\n                if (ErrorCode.IsRpcNeedThrowException(response.Error))\n                {\n                    throw new RpcException(response.Error, $\"Message: {response.Message} Request: {requestType.FullName}\");\n                }\n\n                return response;\n            }\n        }\n    }\n\n    [EntitySystemOf(typeof(MessageLocationSenderComponent))]\n    public static partial class MessageLocationSenderManagerComponentSystem\n    {\n        [EntitySystem]\n        private static void Awake(this MessageLocationSenderComponent self)\n        {\n        }\n        \n        public static MessageLocationSenderOneType Get(this MessageLocationSenderComponent self, int locationType)\n        {\n            MessageLocationSenderOneType messageLocationSenderOneType = self.GetChild<MessageLocationSenderOneType>(locationType);","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.actorlocation/Scripts/Hotfix/Server/MessageLocationSenderComponentSystem.cs#L296-L332","documentation":"In CallInner, after the switch cases for ERR_NotFoundActor and ERR_MessageTimeout, the response carried an error code that IsRpcNeedThrowException flags as needing to throw — any non-zero error below ERR_WithoutException (200000000). This is the catch-all for unhandled hard RPC errors. The RpcException wraps the server's error code, response.Message, and the request type full name.","triggerScenarios":"Call(entityId, iLocationRequest) where the target actor returns any error code in the ERR_WithException range (100000000–200000000) that isn't ERR_NotFoundActor or ERR_MessageTimeout — e.g., ERR_RpcFail, ERR_SessionSendOrRecvTimeout, or application-specific hard errors.","commonSituations":"Application logic on the target actor threw an exception that surfaced as a hard RPC error. Version mismatch introducing new error codes in the 100M range. Session or connection errors during the RPC. Target actor rejected the request with a hard error.","solutions":["Inspect response.Error (accessible via RpcException.Error property) and response.Message in the exception to identify the specific failure.","Fix the root cause on the target actor side — check its logs for the originating exception.","Catch RpcException and handle the specific error code at the application level.","Verify caller and target run compatible code versions with matching error code definitions."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    IResponse resp = await senderOneType.Call(entityId, iLocationRequest);\n}\ncatch (RpcException e)\n{\n    // Inspect e.Error to determine the specific failure\n    Log.Error($\"RPC failed: error={e.Error} msg={e.Message}\");\n    if (e.Error == ErrorCode.ERR_RpcFail)\n    {\n        // target-side exception — check target logs\n    }\n    throw;\n}","preventionTips":["Inspect RpcException.Error to identify the specific server-side error.","Check target actor logs for the originating exception.","Verify caller and target run compatible code versions.","Handle specific error codes at the application level rather than relying on generic catch."],"tags":["message-routing","rpc","hard-error","catch-all","location-request"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}