Summary
When submitting a deck suggestion without an active internet connection, AnkiCollab displays a full Python traceback instead of a user-friendly error message.
Steps to reproduce
- Disconnect the device from the internet (or otherwise prevent DNS resolution/network access).
- Open Anki and start a deck submission/suggestion through AnkiCollab.
- Submit the deck.
Expected behavior
The add-on should gracefully handle network connectivity failures and show a clear message such as:
"Unable to connect to AnkiCollab. Please check your internet connection and try again."
The operation should fail cleanly without exposing an internal traceback.
Actual behavior
The add-on raises an unhandled requests.exceptions.ConnectionError originating from a failed DNS lookup for plugin.ankicollab.com, resulting in a large traceback being shown to the user.
Root cause in the traceback:
requests.exceptions.ConnectionError
└── urllib3.exceptions.MaxRetryError
└── urllib3.exceptions.NameResolutionError
└── socket.gaierror
The exception occurs while calling:
deck_repr.get_protected_fields(deckHash)
which ultimately performs:
without handling connection-related exceptions. Maybe catch it beforehand or handle gracefully ig
Summary
When submitting a deck suggestion without an active internet connection, AnkiCollab displays a full Python traceback instead of a user-friendly error message.
Steps to reproduce
Expected behavior
The add-on should gracefully handle network connectivity failures and show a clear message such as:
The operation should fail cleanly without exposing an internal traceback.
Actual behavior
The add-on raises an unhandled
requests.exceptions.ConnectionErrororiginating from a failed DNS lookup forplugin.ankicollab.com, resulting in a large traceback being shown to the user.Root cause in the traceback:
The exception occurs while calling:
which ultimately performs:
without handling connection-related exceptions. Maybe catch it beforehand or handle gracefully ig