What Is a 423 Status Code?
The source or destination resource of a method is locked.
This response SHOULD contain an appropriate precondition or postcondition code, such as ‘lock-token-submitted’ or ‘no-conflicting-lock’.
- Source: RFC4918 Section 11.3
423 CODE REFERENCES
Rails HTTP Status Symbol
Symfony HTTP Status Constant
HttpComponents Core org.apache.hc.core5.http.HttpStatus.SC_LOCKED
423 status code example
GET /example-resource HTTP/1.1
HTTP/1.1 423 Locked
<p>The resource you are trying to access is currently locked and unavailable.</p>
In this example, the server has responded with a 423 status code, indicating that the requested resource is currently locked and unavailable. The response includes a
Retry-After header indicating that the client should wait for 120 seconds before trying again, and a
Lock-Token header that contains an opaque token representing the lock.
To unlock the resource, the client can issue a
LOCK request with the same
Lock-Token header value:
LOCK /example-resource HTTP/1.1
HTTP/1.1 200 OK
In this example, the client issues a
LOCK request with the same
Lock-Token header value returned in the previous response, along with an
If header containing the ETag of the locked resource. The server responds with a 200 OK status code, indicating that the resource is now unlocked and available for access.
What causes a 423 status code?
A few scenarios can cause a 423 status code, including:
- A user is trying to edit a document that someone else is already working on
- A website is undergoing maintenance, and the content is temporarily unavailable
- A website has detected suspicious activity on the account and has locked it down for security reasons
How to troubleshoot a 423 status code
If you encounter a 423 status code, there are a few things you can do to troubleshoot the issue:
- Wait for the lock to be released: If the lock is temporary, it will be released automatically after a set amount of time.
- Check with the website or application owner: They may be able to provide more information about the lock and when it will be released.
- Try accessing the resource from a different device or network: There may be an issue with your current device or network that is causing the lock.
How to prevent a 423 status code
There are a few best practices you can follow to avoid a 423 status code:
- Avoid editing the same document or resource simultaneously: If possible, work on separate copies or use version control software.
- Keep your website or application up to date with the latest security patches: This can help prevent unauthorized access and suspicious activity that may trigger a lock.
- Use robust authentication and authorization mechanisms: This can help prevent unauthorized access to resources and reduce the likelihood of locks being triggered.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs