~lioploum/offpunk#30: 
Netcache: gemini status 4 and 5 should not emit a full traceback

When trying to get a gemini resource and apparently when the code returned is an error code (such as 404), a python traceback is displayed. This is confusing for end users and we might be better off with a more human-readable error message.

Sample traceback:

ERROR4: <class 'RuntimeError'> : not found
Traceback (most recent call last):
  File "/usr/lib/python3.11/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GeminiClient' object has no attribute 'do_4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/netcache.py", line 799, in fetch
    path=_fetch_gemini(url,**kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/netcache.py", line 734, in _fetch_gemini
    raise RuntimeError(meta)
RuntimeError: not found

Let me know if I can help any further.

Status
REPORTED
Submitter
~berru
Assigned to
No-one
Submitted
1 year, 6 months ago
Updated
1 year, 5 months ago
Labels
No labels applied.

~lioploum 1 year, 5 months ago

This should be handled together with bug #3

Register here or Log in to comment, or comment via email.