Folder A exists, but is no longer accessible in the CMS. (404 error thrown)
Solution
Do a read call to ensure that the page still exists before making and mutation to the repo in github.
Modifying the file just makes the user see the 404 page, and they have to navigate back to their workspace, which, while annoying, preserves the valid state of the repo.
Limitations
Since we are working with stale data, one would need to do a read call to make sure that the file exists in the particular folder. This would incur an additional call, but the hunch here is that the user will call this endpoint lesser than a window refresh.
Problem
User A creates a folder A
User A creates a page
testPage
inside folder AUser B starts editing page testPage
User A deletes folder A
User B saves page testPage
Observed behaviour:
Folder A exists, but is no longer accessible in the CMS. (404 error thrown)
Solution
Do a read call to ensure that the page still exists before making and mutation to the repo in github. Modifying the file just makes the user see the 404 page, and they have to navigate back to their workspace, which, while annoying, preserves the valid state of the repo.
Limitations
Since we are working with stale data, one would need to do a read call to make sure that the file exists in the particular folder. This would incur an additional call, but the hunch here is that the user will call this endpoint lesser than a window refresh.
Breaking Changes