Skip to content

feat: raise WekanConnectionError on network failures and add request timeout - #47

Merged
bastianwenske merged 1 commit into
mainfrom
fix/connection-error-handling
Aug 16, 2026
Merged

feat: raise WekanConnectionError on network failures and add request timeout#47
bastianwenske merged 1 commit into
mainfrom
fix/connection-error-handling

Conversation

@bastianwenske

Copy link
Copy Markdown
Owner

Improves error handling in WekanClient.fetch_json:

  • New WekanConnectionError (subclass of WekanAPIError) is raised when the server cannot be reached (requests ConnectionError/Timeout), instead of leaking raw requests exceptions.
  • Requests now use a configurable timeout (WekanClient(..., timeout=30)), so calls can no longer hang forever.
  • HTTP errors like a 502 from a reverse proxy already raise WekanAPIError with the status code since the exception refactoring; this is now covered by a unit test as well.

Fixes #16

@bastianwenske
bastianwenske merged commit 3781fd7 into main Aug 16, 2026
1 check passed
@bastianwenske
bastianwenske deleted the fix/connection-error-handling branch August 16, 2026 22:13
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.

Better exception handling on the wekan client requests

1 participant