An application I’m working on has had a working integration with the Pipedrive API for a while now, and just recently the PUT and POST requests stopped working and have been including the following HTML in the responses (status code 400):
<HTML><HEAD>\n<TITLE>Bad Request</TITLE>\n</HEAD><BODY>\n<H1>Bad Request</H1>\nYour browser sent a request that this server could not understand.<P>\nReference #7.28621060.1546984206.0\n</BODY>\n</HTML>\n
The headers I get with these responses are as follows:
{"Server", "AkamaiGHost"},
{"Mime-Version", "1.0"},
{"Content-Type", "text/html"},
{"Content-Length", "216"},
{"Expires", "Wed, 09 Jan 2019 20:34:49 GMT"},
{"Date", "Wed, 09 Jan 2019 20:34:49 GMT"},
{"Connection", "close"}
I am wondering if there are any general categories of issues on my end that could be responsible for this happening? The same application is able to make GET requests successfully (such as searching the /persons
endpoint by email), so this leads me to believe it is not an account-wide issue. This seems specific to POST and PUT requests. In particular, in my case all of the POST and PUT requests are to the /persons
endpoint as well.
An example of the request body I am sending up is:
"{\"email\":[\"myfakeemail@gmail.com\"],\"name\":\"Jane Doe\",\"phone\":[\"8729991234\"],\"2848abc9a9e0e7b84327d7ac06faaa23b6fec783\":\"Foo\"}"
I checked and the custom field I’m sending up is the correct UUID and listed in the account. As for the headers, I’ve tried sending Content-Type
and Accept
set to application/json
both individually and together, but no difference.
Since I haven’t seen this issue reported elsewhere, I’m assuming the issue stems from something my application is doing differently (since everything was working fine before). What I’m looking for is help finding where to look for the thing that might have changed and caused this strange response from the Pipedrive API. I really don’t understand why HTML would be being sent back instead of JSON even after a malformed request from my end.
Any help would be greatly appreciated! Thank you!