{"record":{"id":"3ff6733347ae68e5","repo":"egametang/ET","slug":"location-get-failed-key-key-error-response-er","errorCode":null,"errorMessage":"location get failed key: {key} error: {response.Error} message: {response.Message}","messagePattern":"location get failed key: (.+?) error: (.+?) message: (.+?)","errorType":"exception","errorClass":"RpcException","httpStatus":null,"severity":"error","filePath":"Packages/cn.etetet.actorlocation/Scripts/Hotfix/Server/LocationProxyComponentSystem.cs","lineNumber":421,"sourceCode":"\n                    int delayMs = self.locationRequestRetryIntervalMs * retryCount;\n                    if (delayMs <= 0)\n                    {\n                        delayMs = 1;\n                    }\n\n                    Scene root = self.Root();\n                    EntityRef<Scene> rootRef = root;\n                    await root.TimerComponent.WaitAsync(delayMs);\n                    root = rootRef;\n                    if (root == null)\n                    {\n                        throw new Exception(\"location proxy root disposed\");\n                    }\n                    continue;\n                }\n\n                throw new RpcException(response.Error,\n                    $\"location get failed key: {key} error: {response.Error} message: {response.Message}\");\n            }\n        }\n\n        public static async ETTask AddLocation(this Entity self, int type)\n        {\n            await self.Root().GetComponent<LocationProxyComponent>().Add(type, self.Id, self.GetActorId());\n        }\n\n        public static async ETTask RemoveLocation(this Entity self, int type)\n        {\n            await self.Root().GetComponent<LocationProxyComponent>().Remove(type, self.Id, self.GetActorId());\n        }\n    }\n}\n","sourceCodeStart":403,"sourceCodeEnd":437,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.actorlocation/Scripts/Hotfix/Server/LocationProxyComponentSystem.cs#L403-L437","documentation":"Get received an error from the location server that is neither ERR_Success nor ERR_LocationGetRetry — a terminal, unrecoverable failure. CallPrimaryWithRetry already exhausted its internal retry budget for primary-failover errors, so this is the final error returned. The RpcException wraps the specific server error code and message.","triggerScenarios":"Get(type, key) where the location server returns a database error, internal corruption, ERR_LocationPrimaryUnavailable (all primaries down), or an unrecognized error code that isn't the retryable LocationGetRetry.","commonSituations":"Location server database connectivity failure. Location server process crash with no healthy failover primary. Version mismatch between proxy and server introducing unrecognized error codes. Corrupt location data in the DB.","solutions":["Check location server process health and database connectivity.","Verify the proxy and location server run compatible code versions.","Catch RpcException and inspect response.Error and response.Message for the specific server-side failure code.","Verify service discovery returns healthy Location scenes (GetPrimaryLocationSceneName depends on ServiceDiscoveryProxy)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    ActorId id = await proxy.Get(type, key);\n}\ncatch (RpcException e)\n{\n    Log.Error($\"location get terminal failure key={key} error={e.Error} msg={e.Message}\");\n    // surface to caller or implement fallback\n    throw;\n}","preventionTips":["Monitor location server health and DB connectivity.","Verify proxy and server run matching code versions.","Ensure service discovery returns healthy Location scenes.","Alert on repeated terminal location failures — indicates infrastructure issues."],"tags":["location","rpc","server-error","terminal","infrastructure"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}