Re: [PATCH] git-remote-mediawiki: better error message when HTTP(S) access fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Thu, May 23, 2013 at 10:05:03PM +0200, Matthieu Moy wrote:
>
>> My use-case is an invalid SSL certificate. Pulling from the wiki with a
>> recent version of libwww-perl fails, and git-remote-mediawiki gave no
>> clue about the reason. Give the mediawiki API detailed error message, and
>> since it is not so informative, hint the user about an invalid SSL
>> certificate on https:// urls.
>
> This is definitely an improvement, but it seems like it just the tip of
> the iceberg.

Right.

> I wonder if we can do something like:
>
>   our $mw_operation;
>   $mediawiki->{config}->{on_error} = sub {
> [...]
>           die "$err\n";
>   };

Probably, but that would hardcode the fact that mediawiki errors are
fatal, while in an ideal world, some errors should be recoverable, and
some would require some cleanups before die-ing.

Also, an error during the first mediawiki operation should not
necessarily have the same diagnosis hint as the others: if I just
did a successfull querry, and the next fails, it can hardly be an SSL
certificate error.

I'll send a v2 that covers a bit more (at least, push and pull with an
invalid certificate both give the message).

More work is needed to get a real good error management, but I don't
have time for that now.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]