What Does Status Code 423-LOCKED Mean?
HTTP Status Code 423 Locked means that the source or destination resource of a requested method is locked.
This response should include a precondition or postcondition code like ‘lock-token-submitted’ or ‘no-conflicting-lock.’
The 423 Locked status code is not part of the main HTTP protocol, but it is part of the WebDAV specification, which is an HTTP extension.
WebDAV’s main purpose was to provide a “filesystem via the web.” Users may ‘lock’ individual files and folders to prevent others from altering them, which is one of the program’s main features.
A user can use the HTTP LOCK method to lock a resource and then use the UNLOCK HTTP method to unlock it.
‘Shared locks’ as well as ‘exclusive locks’ are both supported.
423 Code References
Rails HTTP Status Symbol
Symfony HTTP Status Constant
Usage Of Status Code 423 Locked
Outside of WebDAV, I haven’t seen much use of LOCK, UNLOCK, or the 423 code. However, I don’t believe there are any compelling arguments against their use.
One of the main challenges that WebDAV’s lock capability aims to tackle is the problem of several users updating (groups of) resources at the same time.
If you’re having trouble with this, keep in mind that Etags and the If-Match / If-None-Match headers are a more prevalent HTTP features for dealing with it.
These headers perform a little better, especially if they’re needed because they provide the end-user a clear indication that you’re about to override someone else’s modifications. It’s probably preferable if ETags answer your concurrency or ‘lost update’ use-case.
LOCK, on the other hand, allows a user to reserve a resource for modification ahead of time. It may simply tell other users that “someone is actively working on this document.”
Is it possible to solve that problem without using WebDAV http methods? Probably! For example, your REST APIs may simply offer a lockedBy JSON attribute. When enabled, only that user will be able to make changes.
Locking a resource
|RFC4918, Section 11.3||423 Locked|
How do I fix Error 423 Locked?
Remove any zombie locks from the repository, then remove the lock on the file or unlock the repository file to resolve 423 locked issue. Access to the repository is required for all solutions.
I hope this article was able to help you with your doubts and queries related to the HTTP status code 423 Locked. Still, if there are any queries related to this topic, feel free to ask in the comment section, we would be happy to assist you. Thank you.