{"record":{"id":"99c793f33e8375b2","repo":"nextcloud/server","slug":"e-getmessage","errorCode":null,"errorMessage":"$e->getMessage()","messagePattern":"\\$e->getMessage\\(\\)","errorType":"exception","errorClass":"OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked","httpStatus":423,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/LockPlugin.php","lineNumber":59,"sourceCode":"\t\t$this->isLocked = false;\n\t}\n\n\tpublic function getLock(RequestInterface $request) {\n\t\t// we can't listen on 'beforeMethod:PUT' due to order of operations with setting up the tree\n\t\t// so instead we limit ourselves to the PUT method manually\n\t\tif ($request->getMethod() !== 'PUT') {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\t$node = $this->server->tree->getNodeForPath($request->getPath());\n\t\t} catch (NotFound $e) {\n\t\t\treturn;\n\t\t}\n\t\tif ($node instanceof Node) {\n\t\t\ttry {\n\t\t\t\t$node->acquireLock(ILockingProvider::LOCK_SHARED);\n\t\t\t} catch (LockedException $e) {\n\t\t\t\tthrow new FileLocked($e->getMessage(), $e->getCode(), $e);\n\t\t\t}\n\t\t\t$this->isLocked = true;\n\t\t}\n\t}\n\n\tpublic function releaseLock(RequestInterface $request) {\n\t\t// don't try to release the lock if we never locked one\n\t\tif ($this->isLocked === false) {\n\t\t\treturn;\n\t\t}\n\t\tif ($request->getMethod() !== 'PUT') {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\t$node = $this->server->tree->getNodeForPath($request->getPath());\n\t\t} catch (NotFound $e) {\n\t\t\treturn;\n\t\t}","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/LockPlugin.php#L41-L77","documentation":"Error \"$e->getMessage()\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/Connector/Sabre/LockPlugin.php:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}