Hi,
I've encountered an unusual error response in the communication of an HTTP driver. When/After sending a POST request, the error below appears in the stream viewer. I doubt this is a response, because the message is missing an http status line. Does anyone know what this means?
Thanks!
Hi,
That is indeed not a response, but an error code that is being returned.
There is an attempt to translate the error codes in a more readable format for the streamviewer. But that only applies to the WinHttp error messages. Other error codes are not being translated and fall back to the [default] notification.
In this case it's returning error code 6, which is part of WinError.h. That code means "ERROR_INVALID_HANDLE", the handle is invalid. So something probably goes wrong internally. What could be done to get some more clues is to check with e.g. WireShark how the communication looks like. If the communication is not encrypted (not https) then you could see if the request gets sent or not: if there is no request then it goes wrong in setting up the connection/sending command, if you see a request/response then it probably goes wrong when parsing the response. If possible you could try to set up the same thing locally to see if the issue can be reproduced and work with a simulation that sends back the same response.
I found the same issue while using a API call on the AWS CloudFormation
For the record a certain api call requires a (big) single line JSON totally escaped on the URL. It is sort of requiring a body inside the URL (for some strange reason).
Providing a wrong URL (with unescaped chars) will cause this issue.
A wireshark shows the request never gets sent. The error was caused by the query of the URL. It contains characters that need to be encoded, e.g. http://test.be to http3A2F2Ftest.be. (Had to remove the percent sign, because it automatically disappeared) Thanks for helping me solve this issue!