Hello. I am a bit perplexed here, as I am looking at the output from the request I am sending from my go code and comparing it to the Postman collection and not seeing any differences. However in Postman, the request works, where as from the go code I get an HTML 400 response from cloudflare.
And that identical request goes through via postman.
Another note is that when I send this request alone, with a hardcoded bearer token it works. But if I run a bit of code where I:
try the request
if I get a 401 re-authenticate
re-try the request with the new bearer token
It produces this issue.
Is this a rate limit thing where I am hitting the endpoint back to back too quickly? If it was I would hope for a 429 status code
spencer
(Spencer Hunter - Lead Developer Advocate @ Dwolla)
2
Hi @mattholdefer , You’re right, rate limit status codes will return a 429 so I don’t believe that is what is going on here. You’d also have to be hitting the API pretty hard (e.g. 10,000 requests within 10 seconds) in order to hit that rate limit. A 400 typically is the result of a BadRequest or ValidationError…something that is wrong with the request body itself.
I do see some 400 requests from your app in Sandbox but I’m not sure which one I should be digging into. Do you have a timestamp of the request that resulted in this error?
<head>
<title>400 Bad Request</title>
</head>
<body>
<center>
<h1>400 Bad Request</h1>
</center>
<hr>
<center>cloudflare</center>
</body>
</html>
So it seems like the request isn’t even reaching your server, so I don’t know if you would see it in the logs. I think you might have to check the cloudflare logs to see what is happening.