Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't error if autosave runs and there are no changes to save #7347
If autosave runs and there are no changes, the user gets an error banner. This happens when there's an autosave newer than the post content you're editing, and autosave runs again.
This change sets the status code of the error to 200, because the fact that there are no changes since the last autosave shouldn't be an error we alert users to.
Types of changes
If autosave runs and there are no changes, the user gets an error banner.
Ideally, we should never be sending an autosave request in the first place if there are no changes to be saved. As currently implemented, I could imagine there may be cases where the user makes a change and manually resets it back to the original value where autosave could happen (particularly for post content). And regardless it does seem reasonable we don't want to surface/alarm the user on this type of error.
Would this apply for any autosave error (i.e. never show warnings on failed autosave)? I'd guess depending on the error type, we would want to show a notice, so fine as-is.