While Using Business Central Odata Api Odata4 Facing issue

I am accessing Odata Web api , and trying to insert/ update data in Business Central.
But for few records it is throwing below error:

Microsoft.OData.Client.DataServiceRequestException: An error occurred while processing this request. —> Microsoft.OData.Client.DataServiceClientException: The server committed a protocol violation. Section=ResponseStatusLine —> System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine at System.Net.HttpWebRequest.GetResponse() at Microsoft.OData.Client.HttpWebRequestMessage.GetResponse() — End of inner exception stack trace — — End of inner exception stack trace — at Microsoft.OData.Client.SaveResult.HandleResponse() at Microsoft.OData.Client.BaseSaveResult.EndRequest() at Microsoft.OData.Client.DataServiceContext.SaveChanges(SaveChangesOptions options)

has anyone face same issue. please help me if someone has solution

We had a similar issue when we were deleting many records at a time. Did not dig into it, but we got that message rather than a 429 Status. Simply fetching the records in the client and retrying resolved. The auto-generated Odata client code is on my review list since we really didn’t figure out what caused it. Lots of ideas, but nothing proofed.

It is worth noting we have had bugs with the autogenerated client code for OData. Check your PK columns defined in the client code. Keys were not generated correctly when they included dates that contain closing dates. This actually resulted in incorrect data rather than an error.