Getting HTML back in a 400 response

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&#32;&#35;7&#46;28621060&#46;1546984206&#46;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\":[\"\"],\"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!

Hey Percy,

Is this via API Proxy or Also, do you have an example of the request (not just the body) with all of the Headers?

I would recommend trying it again now. I believe the problem is resolved.

@David Thanks! It does appear to be working again for me. Are you able to elaborate on what the issue was?


engineer from Pipedrive here. We are using Akamai content delivery network and there was a misconfiguration for some of our domains there that caused problems with requests which contained JSON bodies. They were able to push the fixed configuration out over the weekend.

Thanks for the report, it helped us identify the problem.