{"record":{"id":"087d9996941e2b66","repo":"alibaba/nacos","slug":"response-geterrmsg","errorCode":null,"errorMessage":"{response.getErrMsg()}","messagePattern":"\\{response\\.getErrMsg\\(\\)\\}","errorType":"exception","errorClass":"NacosLockException","httpStatus":null,"severity":"error","filePath":"lock/src/main/java/com/alibaba/nacos/lock/service/impl/LockOperationServiceImpl.java","lineNumber":296,"sourceCode":"    }\n    \n    @Override\n    public LockResult cancelWait(LockInstance lockInstance, String connectionId) {\n        MutexLockRequest request = new MutexLockRequest();\n        LockInfo lockInfo = new LockInfo();\n        lockInfo.setKey(new LockKey(lockInstance.getLockType(), lockInstance.getKey()));\n        lockInfo.setOwner(lockInstance.getOwner());\n        lockInfo.setConnectionId(connectionId);\n        request.setLockInfo(lockInfo);\n        WriteRequest writeRequest = WriteRequest.newBuilder().setGroup(group())\n            .setData(ByteString.copyFrom(serializer.serialize(request)))\n            .setOperation(LockOperationEnum.CANCEL_WAIT.name()).build();\n        try {\n            Response response = protocol.write(writeRequest);\n            if (response.getSuccess()) {\n                return serializer.deserialize(response.getData().toByteArray());\n            }\n            throw new NacosLockException(response.getErrMsg());\n        } catch (NacosLockException e) {\n            LOGGER.error(\"key: {}, lockType:{} cancel wait fail, errorMsg: {}\",\n                lockInstance.getKey(), lockInstance.getLockType(), e.getMessage());\n            throw e;\n        } catch (Exception e) {\n            throw new NacosLockException(\"cancel wait error.\", e);\n        }\n    }\n    \n    private LockResult expireLock(MutexLockRequest request) {\n        LockInfo lockInfo = request.getLockInfo();\n        AtomicLockService mutexLock = lockManager.getMutexLock(lockInfo.getKey());\n        if (mutexLock instanceof AbstractAtomicLock) {\n            AbstractAtomicLock atomicLock = (AbstractAtomicLock) mutexLock;\n            Boolean expired = atomicLock.autoExpire();\n            if (expired) {\n                if (atomicLock.isClear()) {\n                    boolean hasWaiters = atomicLock.hasWaiters();","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/lock/src/main/java/com/alibaba/nacos/lock/service/impl/LockOperationServiceImpl.java#L278-L314","documentation":"Error \"{response.getErrMsg()}\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at lock/src/main/java/com/alibaba/nacos/lock/service/impl/LockOperationServiceImpl.java:296 when the library encounters an invalid state.","commonSituations":"The lock server returned an error for the lock operation.","solutions":["Review the input and runtime state for lock operation error, correct the reported problem, and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}