sopel
sopel copied to clipboard
url: Unexpected error on nonexistent domains
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.
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.
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