# HTTP 423 Locked — Meaning, Causes & Fixes

> The resource is locked and can't be modified right now (WebDAV).

423 comes from WebDAV (RFC 4918). A client can lock a resource while editing it; anyone else who tries to modify it gets 423 until the lock is released or expires. You'll meet it with file sync and document-collaboration servers such as SharePoint, Nextcloud and ownCloud.

- Class: 4xx Client Error
- Retry: With backoff (idempotent requests only)
- Cacheable by default: no
- Defined in: [RFC 4918 §11.3 — 423 Locked](https://www.rfc-editor.org/rfc/rfc4918#section-11.3)

## Example response

```http
HTTP/1.1 423 Locked
Content-Type: application/json
Content-Length: 18

{"error":"Locked"}
```

## Common causes

- Another user or app holds a WebDAV lock on the file.
- A stale lock left behind by a client that crashed.

## How to fix it

1. Wait for the lock to expire, or close the file in the app that holds it.
2. Administrators can usually clear stale locks from the server's admin tools.

## Send a 423 from your server

### Express

```
res.status(423).json({ error: "Locked" });
```

### Next.js route handler

```
return Response.json({ error: "Locked" }, { status: 423 });
```

### Flask

```
return {"error": "Locked"}, 423
```

### Go net/http

```
http.Error(w, "Locked", http.StatusLocked)
```

### nginx

```
return 423;
```

## FAQ

### Is 423 used outside WebDAV?

Some APIs borrow it for 'temporarily locked', but it's defined by WebDAV and generic clients won't treat it specially.

## Related status codes

- [409 Conflict](https://www.devkult.com/http/409.md)
- [412 Precondition Failed](https://www.devkult.com/http/412.md)
- [503 Service Unavailable](https://www.devkult.com/http/503.md)

Open the interactive page: https://www.devkult.com/http/423