REST POST Request: "A file with this name already exists"

I’m using REST POST to push files from snaplogic to gitlab.

It was working okay for a couple of months until last week.

Now when push files that already exists in gitlab (that have updates in snaplogic), I get this error:
“REST API service endpoint returned error result: status code = 400, reason phrase = Bad Request”
“A file with this name already exists”

When I push new files, it says
“REST API service endpoint returned error result: status code = 400, reason phrase = Bad Request”
“A file with this name doesn’t exist”

Please let me know any additional info can provide to help readers understand the issue better

I am having the same issue for a particular repo.
The error comes up even while creating a folder and file that is not there before in the commit history

Using plpython code to send the request

data = {
‘branch’: ‘main’,
‘commit_message’: ‘blah blah blah’,
‘actions’: [
{
‘action’: ‘create’,
‘file_path’: ‘README.rst’,
‘content’: open(‘path/to/file.rst’).read(),
},
{
# Binary files need to be base64 encoded
‘action’: ‘create’,
‘file_path’: ‘logo.png’,
‘content’: base64.b64encode(open(‘logo.png’).read()),
‘encoding’: ‘base64’,
}
]
}

commit = project.commits.create(data)

Can someone from Gitlab help us understand what we need to do differently to address this issue, no one seem to be responding to this issue with a solution. So frustrating!