[Common Issue] Netlify CMS API_ERROR. Now what?

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!

https://github.com/issues?q=is%3Aopen+is%3Aissue+API_ERROR++repo%3Anetlify%2Fnetlify-cms

Hi @perry,

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.

Thanks @perry!

Could this be because you have a clashing branch name, like in post 2 of this topic?

What do you mean @Scott?

That particular error you’re seeing, it sounds a bit like:

@Scott @aaronrye12 this issue is already being handled in a separate topic:

1 Like

Thanks for the signposting, Tom!

1 Like

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!

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?

Yup, branch is set correct. Such as the ff right?

backend:
  name: git-gateway
  branch: master

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.