Random 500 errors on API endpoint

Hi, I’m working on a new Pipedrive client in C# available here, but my integration tests are flaky because I get a bunch of random 500 errors every time I try to run my full suite of tests. My tests are working fine when I run them one by one.

You can see my logs here.

Can someone help me? I would be happy to work with the Pipedrive engineers to identify the problem.

Hi David,

I am trying to figure out what might be the cause of this happening. Is it still with only bulk actions where you encounter the 500 error?
I’m wondering if it might just be a result of you running into API limiting

Hi David,

Yes, it occurs when I run all my tests at once. I’ll try to apply a timeout between each test to see if it’s works.

But if I’m running into API limiting, the Pipedrive API should return a 429 Too Many Requests as written in the documentation: https://pipedrive.readme.io/docs/core-api-concepts-http-status-codes

Failed Pipedrive.Tests.Integration.Clients.DealFieldsClientTests+TheGetAllMethod.CanRetrieveDealFields
Error Message:
Newtonsoft.Json.JsonReaderException : Could not convert string to integer: open. Path ‘data[43].options[0].id’, line 1, position 15340.

Looks like it might not be a 500 error, but an unexpected response from your side?

Sorry, I assumed the deal field option ids were only integer, but they can be integer or string (still trying to figure out all the subtilities of the result returned by the API). I fixed it on master!

I can give you by PM my sandbox credentials if you want, to be sure that my integration tests doesn’t break because there are asumptions about the way entities are created.

Certainly. If you run into further specific issues, you can always share those details with me so I can examine it further.

I don’t see any Private Message button on Discourse, are they activated? Or can you give me your email?

You should see the option now.

Are you able to reproduce? Did you find something?

Hi David(s),

I’m encountering the same situation when I try retrieve all deals related to my company. In random runs, I get 500 error. Have you been able to solve the issue stated in this thread? Any suggestions? I have a timeout applied as well.

I get the correct 429 (Too Many Requests) error code now, I guess it’s fixed!

Hi Everyone. I am facing random 500 error when I try to editAnActivity.
Basically whenever I try to add a new participant to current participants of an activity, I get random 500 error and the participant is not added.

This is my detailed issue. Please help.