{"record":{"id":"58d79b056c8a7afe","repo":"eclipse-vertx/vert.x","slug":"423-locked-webdav-rfc4918","errorCode":null,"errorMessage":"423 Locked (WebDAV, RFC4918)","messagePattern":"423 Locked \\(WebDAV, RFC4918\\)","errorType":"http","errorClass":null,"httpStatus":423,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java","lineNumber":250,"sourceCode":"  /**\n   * 417 Expectation Failed\n   */\n  HttpResponseExpectation SC_EXPECTATION_FAILED = status(417);\n\n  /**\n   * 421 Misdirected Request\n   */\n  HttpResponseExpectation SC_MISDIRECTED_REQUEST = status(421);\n\n  /**\n   * 422 Unprocessable Entity (WebDAV, RFC4918)\n   */\n  HttpResponseExpectation SC_UNPROCESSABLE_ENTITY = status(422);\n\n  /**\n   * 423 Locked (WebDAV, RFC4918)\n   */\n  HttpResponseExpectation SC_LOCKED = status(423);\n\n  /**\n   * 424 Failed Dependency (WebDAV, RFC4918)\n   */\n  HttpResponseExpectation SC_FAILED_DEPENDENCY = status(424);\n\n  /**\n   * 425 Unordered Collection (WebDAV, RFC3648)\n   */\n  HttpResponseExpectation SC_UNORDERED_COLLECTION = status(425);\n\n  /**\n   * 426 Upgrade Required (RFC2817)\n   */\n  HttpResponseExpectation SC_UPGRADE_REQUIRED = status(426);\n\n  /**\n   * 428 Precondition Required (RFC6585)","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java#L232-L268","documentation":"SC_LOCKED is an HttpResponseExpectation constant for HTTP 423 (WebDAV, RFC4918). It means the destination resource of the request is locked, so the method (typically PUT/DELETE/PROPPATCH) cannot be performed. Vert.x provides it for asserting or handling this status in client expectations.","triggerScenarios":"A WebDAV request (PUT, DELETE, PROPPATCH, MOVE) targets a resource holding an active lock owned by another token/user, or a lock token was not supplied with the If header. Also surfaces when a WebDAV-backed API rejects modifications to locked collections.","commonSituations":"Collaborative editing systems where another user/session holds a lock; stale locks left after a crashed client; lock timeout shorter than the editing session; missing lock token in the If header.","solutions":["Acquire or refresh the lock (LOCK method) and send the correct lock token in the If header of the modifying request.","Wait for or request removal of the conflicting lock (UNLOCK by the owner or an administrator).","Check for stale locks left by crashed clients and clear them server-side.","Handle 423 in the client by surfacing 'resource is locked' to the user instead of a generic failure."],"exampleFix":"// before\nwebdavClient.delete(\"/docs/file.txt\").expecting(HttpResponseExpectation.SC_NO_CONTENT);\n// after\n// include lock token\nrequest.putHeader(\"If\", \"(<opaquelocktoken:uuid-123>)\");\nwebdavClient.delete(\"/docs/file.txt\").expecting(HttpResponseExpectation.SC_NO_CONTENT);","handlingStrategy":"retry","validationCode":"boolean isLocked = vertx.fileSystem().existsBlocking(lockFilePath); // or check lock discovery via PROPFIND before write","typeGuard":"boolean is423(HttpClientResponse resp) { return resp.statusCode() == 423; }","tryCatchPattern":"delete().onFailure(err -> {\n  if (isCauseStatus(err, 423)) retryAfterLockReleased(delay);\n});","preventionTips":["Always send the lock token in the If header for locked resources","Refresh locks during long operations","Clean up stale locks from crashed clients","Poll lock state (PROPFIND) before attempting writes"],"tags":["http","webdav","locking","vertx-http-client"],"backgroundTag":"http-error-status","analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}