@fool, thanks for your response!
I ran into the same issue now myself so I had a chance to check the JWT token. It seems to also have a 1 hour expiry, however I’m getting the error while it’s still valid (currently 20 minutes since I logged in, and 40 minutes left on the clock according to
Opening the article editor in a new tab also doesn’t ask me to log in again (it just asks if I want to restore a local backup of the article).
Any other ideas?
(Note: when trying to click save again a minute or two later it worked just fine…)
December 14, 2020, 6:29pm
Hi there! sorry to be slow to reply - there are quite a few API error issues on the Netlify CMS repo.
‘API ERROR’ is a common catch-all error message for a variety of different reasons.
Probably your best bet is to go and see if there is an issue that matches your circumstances - its possible there is a solution, or you are more than welcome to file a new one!
can i ask what is the main reason here when im uploading a image in netlify cms it shows “Failed to persist media: API_ERROR” but its uploading in our github repo.
January 20, 2021, 11:33am
Could this be because you have a clashing branch name, like in post 2 of this topic?
January 21, 2021, 10:37am
That particular error you’re seeing, it sounds a bit like:
Failed to persist entry: API_ERROR: Reference update failed
You’re using the editorial workflow but already have a branch called cms. This error is fixed by removing the cms branch from the repo.
@Scott @aaronrye12 this issue is already being handled in a separate topic:
It’s hard to tell the cause for the error without additional information. If you open your browser developers tools you should be able to see a log message with the error and under the network tab the request to upload the image should also provide some insights.
Regardless, I recommend updating to the latest CMS version which is email@example.com.
January 21, 2021, 10:42am
Thanks for the signposting, Tom!
This is super helpful, thank you, but has anyone encountered “Failed to persist entry: API_ERROR: Validation Failed”?
It doesn’t affect all of my posts, only one in the collection. There is another message about it on this board however the resolution of the issue was not posted:
Netlify CMS: 'Failed to persist entry: API_ERROR: Validation Failed' - #2 by hrishikesh
Thanks for reaching out! Let’s continue the conversation on the thread you linked (
also here) in order to streamline support!
September 25, 2022, 3:04pm
Hello, what if the error is simply “Failed to persist entry: API_ERROR” with none of the text in your examples (“Not Found” / “Validation Failed”)?
This pops up when trying to add a first entry to a collection.
@cobbie Have you set the right branch in your config?
January 9, 2023, 6:54pm
Yup, branch is set correct. Such as the ff right?
January 10, 2023, 10:24pm
Looks reasonable to me. This of course could only work if we are hosting the site live - to use our hosted git-gateway as the backend.