eclipse-vertx/vert.x · error
423 Locked (WebDAV, RFC4918)
Error message
423 Locked (WebDAV, RFC4918)
What it means
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.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java:250
/** * 417 Expectation Failed */ HttpResponseExpectation SC_EXPECTATION_FAILED = status(417); /** * 421 Misdirected Request */ HttpResponseExpectation SC_MISDIRECTED_REQUEST = status(421); /** * 422 Unprocessable Entity (WebDAV, RFC4918) */ HttpResponseExpectation SC_UNPROCESSABLE_ENTITY = status(422); /** * 423 Locked (WebDAV, RFC4918) */ HttpResponseExpectation SC_LOCKED = status(423); /** * 424 Failed Dependency (WebDAV, RFC4918) */ HttpResponseExpectation SC_FAILED_DEPENDENCY = status(424); /** * 425 Unordered Collection (WebDAV, RFC3648) */ HttpResponseExpectation SC_UNORDERED_COLLECTION = status(425); /** * 426 Upgrade Required (RFC2817) */ HttpResponseExpectation SC_UPGRADE_REQUIRED = status(426); /** * 428 Precondition Required (RFC6585)
View on GitHub (pinned to fb308bd8c3)
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.
Example fix
// before
webdavClient.delete("/docs/file.txt").expecting(HttpResponseExpectation.SC_NO_CONTENT);
// after
// include lock token
request.putHeader("If", "(<opaquelocktoken:uuid-123>)");
webdavClient.delete("/docs/file.txt").expecting(HttpResponseExpectation.SC_NO_CONTENT); Defensive patterns
Strategy: retry
Validate before calling
boolean isLocked = vertx.fileSystem().existsBlocking(lockFilePath); // or check lock discovery via PROPFIND before write
Type guard
boolean is423(HttpClientResponse resp) { return resp.statusCode() == 423; } Try / catch
delete().onFailure(err -> {
if (isCauseStatus(err, 423)) retryAfterLockReleased(delay);
}); Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- 424 Failed Dependency (WebDAV, RFC4918)
- 425 Unordered Collection (WebDAV, RFC3648)
- 421 Misdirected Request
- 422 Unprocessable Entity (WebDAV, RFC4918)
- 426 Upgrade Required (RFC2817)
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/58d79b056c8a7afe.
Report an issue: GitHub.