curl-and-python

Re: better error info

From: <johansen_at_sun.com>
Date: Mon, 8 Feb 2010 12:47:10 -0800

On Fri, Feb 05, 2010 at 04:53:57PM -0500, Seth Vidal wrote:
>
>
> On Fri, 5 Feb 2010, johansen_at_sun.com wrote:
>
> >On Fri, Feb 05, 2010 at 04:07:18PM -0500, Seth Vidal wrote:
> >>Johansen,
> >> I was hoping there was a way that didn't involve shelling out so I
> >>could deliver a sensible error message to the user.
> >
> >It sounds like I misunderstood. I thought you were trying to debug a
> >problem.
> >
> >This is what gets left in the error buffer when our client gets an error
> >60. It doesn't tell you where in the chain you encountered the problem,
> >but the error message is a bit more informative. Our code gets this
> >from multi_info_read, but I believe you can also get this from
> >easy.strerror() since Pycurl configures CURLOPT_ERRORBUFFER on easy
> >handles by default.
> >
> >SSL certificate problem, verify that the CA cert is OK.
> >Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
> >verify failed
> >
> >I'm not sure if this helps or not. :-/
>
> interesting when I get error 60 I call CurlInstance.errstr() and I
> get back ''.
>
> Maybe I'm missing something - what object are you using strerror() from?

Hm. In my case, I'm calling multi.info_read() instead of
easy.strerror(). From the code, it looked like both of these functions
had access to the ERRORBUFFER, but maybe I missed something.

-j
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2010-02-08