You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consistent error handling and logging across OSHConnect #46
Failures in OSHConnect are reported inconsistently, and the library's diagnostics leak into the host application's logging config. #42 was one instance (a swallowed POST failure surfacing later as an unrelated AttributeError); #43, #44, and #45 are three more found in the same pass. They share root causes worth fixing as a set rather than one-off.
Current state, measured on main:
Symptom
Count
Where
Bare raise Exception(...) — callers can't catch selectively
The consequence for downstreams (OSHConnectBroker-Py hit all of these): you cannot except OSHConnectError around a sync loop, you cannot silence or route OSHConnect's logging without touching the root logger, and a failed discovery is indistinguishable from an empty server.
Scope
Sub-issues track the individual pieces. This issue is the umbrella — close it when they're all done.
Not in scope: changing which operations fail (only how failures are reported), and rewriting the api_helpers.py free-function layer, which intentionally returns raw requests.Response.
Compatibility
Any new exception type should subclass Exception so existing except Exception: callers keep working. The logging changes are additive — a library that stops writing to the root logger only affects apps that were relying on that leak.
Activity
Merge pull request #52 from Botts-Innovative-Research/fix/error-handl…