Re: Error Handling Feedback

vigorous-neatness--- via curl-library <[email protected]> Sat, 7 Mar 2026 22:07:32 -0600
Newsgroups gmane.comp.web.curl.library
Message-ID <[email protected]>
Hi Andrew,

You can use CURLOPT_ERRORBUFFER (https://curl.se/libcurl/c/CURLOPT_ERRORBUFFER.html) before sending the request to get more information. You should also probably be taking a look at the response code from your curl_easy_perform call - it likely contains information on the failure type if it failed. Your curl_easy_getinfo, I presume, is simply checking the HTTP code - where there is none if an http request never actually occurred.

> On Mar 6, 2026, at 15:43, Andrew Bell via curl-library <[email protected]> wrote:
> 
> Oantby Info:
> 
> Original From: Andrew Bell via curl-library <[email protected]>
> Original To: [email protected]
> Cc: Andrew Bell <[email protected]>,[email protected]
> Hi,
> 
> I was having an occasional failure of my application and when I turned on debug I got the following:
> 
> * upload completely sent off: 16 bytes
> * connect to 127.0.0.1 port 8080 from 127.0.0.1 port 59936 failed: Connection reset by peer
> * Failed to connect to 127.0.0.1 port 8080 after 4 ms: Could not connect to server
> * closing connection #5
> 
> I am getting a zero(0) code from my HTTP get request when I call curl_easy_getinfo(), but it would be nice to be able to get the "connection reset by peer" information. Is there a way to fetch such detailed feedback?
> 
> Thanks,
> 
> --
> Andrew Bell
> ### Original To: [email protected]
> ### Cc: Andrew Bell <[email protected]>,[email protected]
> 
> -- 
> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
> Etiquette:   https://curl.se/mail/etiquette.html

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html