Hi @hemakumar, are you seeing this error in local simulation when using fdk run or in production? Does the external API use standard HTTP port 443, or is it on a custom port? If it is in local simulation, can you share what FDK version you are on?
Thanks for the update. At a glance, you will see this error if something blocks FDK from communicating with the external service. This can be due to a firewall or if the external API is unavailable.
Can you share the following with us to debug further:
Do requests to other HTTP APIs respond successfully from your local simulation?
Do you see the same error if you publish the app in production as a custom app?
Does the HTTP API in question use non-standard ports?
The code used to send the request (with sensitive information redacted).
A copy of fdk.log with any sensitive information redacted.
@hemakumar Thanks for sending the code snippet. I still need answers to the remaining questions I have asked above. Mainly, are you able to send request to other external HTTP APIs from this app? We need to understand if you are seeing a behaviour specific to this API you have mentioned. These errors usually result from some network firewall restrictions or some behaviour of the external API.
The second argument to client.request.post(), if present, must be an options object that takes body as a property. I hope the body variable in the screenshot is properly structured. For example, if the body variable contains data to be sent as an HTTP request body, then you will have to rewrite the method call as: