Cannot diagnose 400 HTTP POST request

Hi all,

I have HTTP write requests failing in the access.log, is there any way on the server side to see more details about the payload that caused the problem?
The client is in firmware and I don’t have access to the code or to the requests. I have the logging level set to debug but nothing gets logged? - - [29/Jul/2020:19:32:39 +0000] “POST /write?precision=s&db=iota HTTP/1.1” 400 69 “-” “-” 43b7f47d-d1d2-11ea-93bf-0a10ff36ad26 147482


Enabling the info log level actually gives me the request payload, however still no error in the logs.
I had to replay the request using curl to figure out what the problem was :frowning:


Glad you figured it out.
If you have time, can you add few more details on what the issue was. It may help others who hit something similar in future.
Also, curious who the replay via curl method, never knew that was possible before.

The issue was that after a network problem, a device was trying to backfill old data that was outside the retention period. It received a 400, and kept retrying rather than moving on to more recent data.
An option to return 200 and just discard the data would be great…

I am getting other 400s that I cannot explain, influx should definitely log the reason why it returns a 400 when it does!