sopel icon indicating copy to clipboard operation
sopel copied to clipboard

url: Unexpected error on nonexistent domains

Open dgw opened this issue 2 years ago • 1 comments

The following code line raises an unhandled dns.resolver.NXDOMAIN for URLs at nonexistent domains:

https://github.com/sopel-irc/sopel/blob/eff60e9b49a14e1f3c0c4dab5bb4d2ddbf0098a5/sopel/modules/url.py#L377

Some variant of this operation has been in the code for a while, but the context has changed so much during 8.x that I decided not to follow git blame all the way back to the first addition of dns.resolver. Seemed like a waste of time.

dgw avatar Sep 09 '22 15:09 dgw

I created this just to track it, but didn't dive into the code yet. Might be good that I didn't spend any more time because #2285 might just get rid of the cause entirely.

dgw avatar Sep 09 '22 18:09 dgw

Stumbled into a decent reproducer for this error: a message that contains a URL terminated by a backtick `, e.g.

09:52 <+SnoopJ> does it happen for `hypothetical_language_variable = https://github.com` too
09:52 <+Sopel> Unexpected NXDOMAIN (The DNS query name does not exist: github.com`.) from SnoopJ at 2023-03-20 13:52:13.198849. Message was: does it happen for `hypothetical_language_variable = https://github.com` too

SnoopJ avatar Mar 20 '23 13:03 SnoopJ