Closed alexanderleegs closed 1 year ago
@alexanderleegs have we retried how this functions with FE with the new 423 error?
Yup, it shows up as an error toast with the message we've specified (Your page could not be updated. Someone else is currently modifying repo a-test-v4. Please try again later.
)
Problem
This PR fixes issues with our existing mutex lock. It has been tested on both local dev and staging.
Currently, our route handler behaviour seems to suffer from 2 issues that make our mutex locks not work as intended:
next
does not cut off the remainder of the method, and must be cut off explicitly - in our existing implementation, even if the mutex lock is hit, the actual route still continues to executeThis PR modifies the behaviour of both our write and rollback wrappers to handle this scenario.
In addition, the returned error has been modified from
409
to423
(Locked) - this is to better reflect the reason for rejecting the request, and also results in a regular error toast on the frontend instead of the special conflict modal that would normally show up for modification of outdated files.Resolves IS-478