Skip to content

423 Locked — Meaning, Common Causes & How to Fix

423 4xx Client Error RFC 4918

423 Locked means: A WebDAV code: the target resource is locked, so the requested method cannot proceed. Locks may be exclusive (one writer) or shared (readers), and the response body typically describes the lock owner and token. Client-error 4xx codes mean the request itself is the problem: malformed syntax, missing credentials, forbidden access, a nonexistent resource or a violated precondition. The server is telling the client what to change; retrying the identical request without a fix will reproduce the same error. In practice you will meet 423 when editing a document another user has checked out/locked in webdav; a caldav client tries to modify a locked calendar resource; a collaborative editor holds an exclusive write lock during a session. On the client side, read the lock details, wait for release or coordinate with the lock owner; supply the correct lock token if you own the lock. On the server side, implement lock tokens and timeouts so abandoned locks expire; return lock-owner information in the 423 body to make conflicts resolvable.

Advertisement
Ad slot · ref-top

When 423 happens

  • Editing a document another user has checked out/locked in WebDAV
  • A CalDAV client tries to modify a locked calendar resource
  • A collaborative editor holds an exclusive write lock during a session

How to fix it

On the client

Read the lock details, wait for release or coordinate with the lock owner; supply the correct lock token if you own the lock.

On the server

Implement lock tokens and timeouts so abandoned locks expire; return lock-owner information in the 423 body to make conflicts resolvable.

Should you retry?

Not retryable as-is: change the request (credentials, payload, URL) first.

Debugging steps

When 423 appears unexpectedly, start by capturing the full exchange: 'curl -i' or the browser DevTools Network tab shows the exact status line and response headers, which often carry the real explanation. Read the error body first — well-designed APIs name the offending field or missing credential. Then diff your actual request, headers included, against the documented contract. For this code specifically, check whether the most common trigger applies to your situation: editing a document another user has checked out/locked in webdav. Compare your exchange against the raw HTTP example above. If you operate the server, correlate the timestamp with application and proxy logs using the request id; if you are the client, verify the request shape against the API documentation before changing anything or retrying.

Notes & gotchas

WebDAV locks must carry timeouts so a crashed client cannot hold a resource forever; a 423 without lock-owner information leaves the conflict unresolvable.

Examples

Raw HTTP
HTTP/1.1 423 Locked
Content-Type: application/xml
Content-Length: 104

{
  "error": "locked",
  "message": "Editing a document another user has checked out/locked in WebDAV"
}
curl
curl -i https://api.example.com/v1/resource   # observe the 423 response and its headers
JavaScript (fetch)
const res = await fetch("https://api.example.com/v1/resource");
if (res.status === 423) {
  const problem = await res.json(); // read field-level details
  // fix the request (credentials, payload, URL) — identical retries keep failing
  throw new RequestError(problem);
}
Python (requests)
import requests

res = requests.get("https://api.example.com/v1/resource", timeout=10)
if res.status_code == 423:
    problem = res.json()  # field-level error details
    # correct the request before retrying — identical retries keep failing
    raise RequestProblem(problem)

Frequently asked questions

Is 423 used outside WebDAV?

Rarely. Some APIs borrow it for 'resource locked by another process', but 409 Conflict is the more common general-purpose choice.

How do locks expire?

WebDAV locks carry a timeout; servers must release them when it elapses so a crashed client does not lock a resource forever.

Are 4xx errors always the client's fault?

By contract yes — the server asserts the request must change. In practice servers sometimes misuse 4xx for their own problems (e.g. 400 for internal validation bugs), so read the error body before blaming your client code.

Should I retry 4xx responses automatically?

Generally no: the server says the request must change. Exceptions are 408 (fresh connection), 425 (after handshake) and 429 (after Retry-After). Blind retries of 400/401/403/404 just burn quota.

Advertisement
Ad slot · ref-in-article

Try the JSON Validator

Check JSON syntax and locate errors by line and column.

Open tool →