Skip to content

Conversation

@kyluca
Copy link
Contributor

@kyluca kyluca commented Oct 9, 2025

As discussed in #267 (comment)

One of the scenarios in which a URLError is received is when the request for a page fails on a subset of the platforms, but some platforms succeed. In this case, we should display the result that was retrieved successfully instead of throwing an error.

Sample output:

screenshot_from_2025_10_09_10_10_26

This shows the subset of requests that failed and the one that succeeded, then displays the result. The extra logging to demonstrate the process locally I removed before committing.

This will resolve the error I received earlier:

Error fetching from tldr: <urlopen error _ssl.c:990: The handshake operation timed out>

@sebastiaanspeck
Copy link
Member

I can imagine that you only want to see the logging you have shown in the screenshot if you add a --verbose/--debug flag to the command and not for every command you do.

@kyluca
Copy link
Contributor Author

kyluca commented Oct 9, 2025

Yeah that's right, the logging sample was related to some local testing I did for #267 but isn't present in this branch/PR.

Here is an updated screenshot of the current output from this branch:

screenshot_from_2025_10_09_16_44_04

@kyluca
Copy link
Contributor Author

kyluca commented Oct 9, 2025

For completeness, this is the error I get on the current main branch without the fix:

screenshot_from_2025_10_09_16_46_19

Copy link
Member

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution. I have tested the changes locally, so the PR is GTG.

@kbdharun kbdharun merged commit 6d5c77f into tldr-pages:main Oct 9, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants