We have a script that runs when we deploy our app to an environment in our build pipeline. I’m getting a bunch of 409 conflict errors when our automated space update happens.
Our update script calls space.getContentTypes() to get all the “remote” content types. It then looks at our local list bundled with the code and if the content type exists it updates it and publishes it. Otherwise it tries to create it.
The root cause of our issue is that when we run space.getContentTypes() it doesn’t return all of them. So our script tries to create a new content type in the target space. But it’s actually there in the space, so we get a 409.
I will create a ticket with Contentful so that I can list my actual space id and an example of a content type that doesn’t come back, but if there are any suggestions here that would be nice too.