Closed petedejoy closed 4 years ago
Did you try making API request from postman or other method, does it hang too?
Yes, I tried making the request to my API endpoint (which calls all of those functions sequentially) from both my website test environment and Postman.
If API hangs in postman too, then better to report it to support engineers, then we can trace / check logs of your company
@tot-ra what is the best channel to do that through?
Best one is support chat in the app https://support.pipedrive.com/hc/en-us/articles/115005875565
Optionally, there is also community forum that can also answer questions on API https://devcommunity.pipedrive.com/
It seems that the API endpoint is healthy. Commenting out the code that uses this library and using axios to post the /deals endpoint directly instead returns a successful and expected response:
function createDeal(title) {
axios.post('https://<my-pipedrive-domain>.pipedrive.com/v1/deals?api_token=<my-api-token>', {
title,
}).then((res) => {
console.log(`statusCode: ${res.statusCode}`)
console.log(res)
})
.catch((error) => {
console.error(error)
})
// return new Promise(resolve => pipedrive.Deals.add({ title }), (err, decoded) => {
// if (err) {
// Sentry.captureException(new Error(err));
// return resolve({});
// }
// return resolve(decoded)});
}
Note that all of the other functions I'm using from this package resolve as expected (pipedrive.Organizations.add, pipedrive.Persons.add).
@petedejoy Could it be you are making a lot of requests? There is some rudimentary rate limiting which tries to debounce the requests. I guess there might be a condition where requests pile up and will maybe be made far in the future.
Could you possibly monitor the x-ratelimit-*
headers from the API responses and see what they look like just before you are seeing timeouts?
I really don't think I'm hitting a rate limit- I make like 3 requests a day. Another interesting thing is that, while changing the one deals
function to use Axios instead of this library caused everything to run as expected, changing everything to Axios calls produces the same result as described here- the first two calls pass and the third gets hung up.
@petedejoy 🧐
Can you maybe try to turn on logging by setting PIPEDRIVE_DEBUG=true
in your environment? And see what the output says?
Also, as @tot-ra suggested, it might make sense to open a support ticket via support chat - we might have to track this issue on our server side and check the logs, but for that we need company account information, which should never be shared here.
Closing this due to inactivity and the release of the new version of the client.
I have an express API that handles routing form submission data to Pipedrive via a series of 3 API calls:
Due to a reason that I can't identify, my
pipedrive.Deals.add
function began getting hung up and timing out yesterday. My deal does get created in Pipedrive, but no response or error is returned. I am also using Sentry to catch errors and see nothing in there. Here are the functions I use:Completes successfully and returns the expected
org
object.Completes successfully and returns the expected
persons
object.Seems to complete (ie. deal is created in Pipedrive), but returns no response, doesn't log out any errors, and the API request hangs indefinitely. Could someone help point me to what's going wrong here? I suspect there is either a bug with this node package or that something is going on with the Pipedrive API's
deals
endpoint, but I could be handling something incorrectly in my code as well.Note that this request did work as expected previously and I am almost certain nothing changed in my API code.