contentstack / contentstack-management-dotnet

The Content Management SDK is used to manage the content of your Contentstack account. This includes creating, updating, deleting, and fetching content of your account
https://www.contentstack.com/docs/developers/apis/content-management-api/
MIT License
2 stars 3 forks source link

"Request Header Fields Too Large" when calling management api multiple times #18

Closed sdm7306 closed 3 months ago

sdm7306 commented 1 year ago

I am writting my own bulk operations script to mass update and publish our contentstack entries via the management API.

The sdk throws a ContentstackException when attempting to call the management api multiple times with a "Request Header Fields Too Large" error message. I am dealing with a couple thousand entries and it always seems to start failing on the 1271st call to the API.

at Contentstack.Management.Core.Http.ContentstackHttpRequest.GetResponse() at Contentstack.Management.Core.Runtime.Pipeline.HttpHandler.InvokeSync(IExecutionContext executionContext) at Contentstack.Management.Core.Runtime.Pipeline.RetryHandler.RetryHandler.InvokeSync(IExecutionContext executionContext) at Contentstack.Management.Core.ContentstackClient.InvokeSync[TRequest](TRequest request)

I was able to get arround the error by creating a new client instance for every single call which is not ideal.

I am using .NET 6 with contentstack.management.csharp" Version="0.1.0"

ishaileshmishra commented 1 year ago

Thanks for reaching out, @sdm7306. We appreciate you bringing this issue to our attention. Our team will investigate the problem you encountered with the Contentstack SDK when making multiple calls to the management API, resulting in a 'Request Header Fields Too Large' error message.

We will work on fixing the issue and, if necessary, provide you with an updated build that addresses this problem.

Thank you for your understanding

lauerya commented 1 year ago

+1, we are experiencing this same issue. Each request is appending the Accept header with "image/jpeg" which eventually causes this error to be thrown.

Is there any update on this issue? Thank you!

nadeem-cs commented 3 months ago

This issue has been fixed for InvokeAsync calls and we will be fixing for InvokeSync calls in the upcoming release.