node-curl
node-curl copied to clipboard
CURL Error codes
How can you get the error code from CURL when an error occurs. All I seem to be able to see is a free text error message like: "Couldn't resolve host name" which doesn't even match the libcurl error codes text for that particular error:
CURLE_COULDNT_RESOLVE_HOST (6) Couldn't resolve host. The given remote host was not resolved.
How can I get the coded value or the matching text from the curl.on(error', function(e) {}); method?
Error code is not supported in current version. The error code is converted to error message by curl_easy_strerror
.