Hello, World! Is there a way to get more logs or m...
# ktor
b
Hello, World! Is there a way to get more logs or more detailed exceptions with Ktor HttpClient, on NodeJS specifically? Currently I'm getting an exception with the message
Fail to fetch
without any more details. This is the same message as if my server wasn't running at all (but it is). I added the Logging plugin with
ALL
level, but that still doesn't tell me what's the underlying issue.
e
unfortunately that sounds like the error is coming from below ktor. you might try node's http debugging https://github.com/nodejs/node/issues/46084
🙏 1
b
thanks a lot for this! By running my test with
./gradlew -i
, I got the exact node command that's executed, so I could run it myself, but with adding
NODE_DEBUG=cluster,net,http,fs,tls,module,timers
and the issue became immediately clear. For some reason
localhost
can't be resolved 🤔 . Using
127.0.0.1
instead resolved my issue.