-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
asyncAsync client implementationAsync client implementationbugSomething isn't workingSomething isn't working
Description
Describe the bug
The baseUrl property validation is inconsistent across async modules. Some modules validate that baseURL is not None, while core/_base.py and oauth.py return it without validation, which can cause cryptic downstream errors.
Modules WITH validation (correct):
capacity.py:52-55statistics.py:43-46
@property
def baseUrl(self) -> str:
if self._config.baseURL is None:
raise ValueError("Base URL is not configured")
return self._config.baseURLModules WITHOUT validation (bug):
core/_base.py:59-60oauth.py:32-33
@property
def baseUrl(self) -> str:
return self._config.baseURL # Can return None!To Reproduce
- Create an AsyncOFSC instance with a configuration that results in
baseURL = None - Call any core or oauth method
urljoin(None, "/rest/...")produces a cryptic error instead of a clear "Base URL not configured" message
Expected behavior
All modules should validate baseUrl and raise a clear ValueError("Base URL is not configured") when it's None.
Additional context
This will be automatically fixed if #148 (AsyncClientBase extraction) is implemented, since the validation will live in a single place. However, this is a standalone bug that could be fixed immediately with a 2-line change in each affected file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
asyncAsync client implementationAsync client implementationbugSomething isn't workingSomething isn't working