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-55
statistics.py:43-46
@property
def baseUrl(self) -> str:
if self._config.baseURL is None:
raise ValueError("Base URL is not configured")
return self._config.baseURL
Modules WITHOUT validation (bug):
core/_base.py:59-60
oauth.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.
Describe the bug
The
baseUrlproperty validation is inconsistent across async modules. Some modules validate thatbaseURLis not None, whilecore/_base.pyandoauth.pyreturn it without validation, which can cause cryptic downstream errors.Modules WITH validation (correct):
capacity.py:52-55statistics.py:43-46Modules WITHOUT validation (bug):
core/_base.py:59-60oauth.py:32-33To Reproduce
baseURL = Noneurljoin(None, "/rest/...")produces a cryptic error instead of a clear "Base URL not configured" messageExpected behavior
All modules should validate
baseUrland raise a clearValueError("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.