The HTTP 423 Locked status code indicates that the requested resource is currently locked and cannot be accessed. This response is commonly used in WebDAV-based systems when a file or resource is locked by another process or user.
When a client tries to modify or access a locked resource, the server responds with status code 423. The lock prevents conflicting updates and ensures data integrity.
// Example: Sending a 423 Locked response in Node.js
res.status(423).send("Resource is locked");
The server denies access and informs the client that the resource is locked. The client should retry later or release the lock if authorized.
Try to "Update Document" while the file is locked.
// Simulated locked resource check
if(resourceLocked){
throw new Error("423 Locked");
}