On Sun, 2020-10-25 at 16:43 -0400, Frank Ch. Eigler wrote:
> > When a file couldn't be retrieved because of an bad HTTPS
> > certificate
> > find-debuginfod currently says:
> > Server query failed: No such file or directory
> > With this patch it will say:
> > Server query failed: Connection refused
> 
> Sure - or could use something like -EPROTO "Protocol error".

I picked ECONNREFUSED since it is already a documented error return
code. And it seemed more appropriate then ENOENT (which is documented
as the server having been contacted successfully, but not able to
retrieve the information needed).

Do you believe  the caller should be able to detect how the connection
was refused? And if so, is EPROTO the most appropriate error code, or
should it be something like ENOKEY?

I am slightly afraid any mapping from CURL errnos to system errnos will
be imprecise. And using a smaller set is better than introducing a new
mapping. But maybe an expired/invalid/unverifiable certificate is the
exception to that rule?

Cheers,

Mark

Reply via email to