MinioAdapter.get() now returns None only for missing objects (NoSuchKey)
Other S3Error and unexpected failures are re-raised instead of being logged and swallowed
ObjectRepositoryInterface.get() documents the contract: None means not found, ConnectionError when disconnected, other backend errors propagate
Motivation
Previously, get() returned None for both "object not found" and real failures such as permission errors or network issues. That made caller logic ambiguous and differed from Redis get(), where missing keys return None and other errors propagate.
Behavior change
Condition
Before
After
NoSuchKey
None
None (unchanged)
Other S3Error
None (logged)
Re-raised
Read/network errors
None (logged)
Re-raised
Not connected
ConnectionError
ConnectionError (unchanged)
This is a small breaking change for callers that treated None as a generic failure indicator.
Test plan
uv run pytest tests/unit/minio_adapter_test.py -v
uv run pytest tests/integration/minio_adapter_test.py -v -k "get or reraise"
## Summary
- `MinioAdapter.get()` now returns `None` only for missing objects (`NoSuchKey`)
- Other `S3Error` and unexpected failures are re-raised instead of being logged and swallowed
- `ObjectRepositoryInterface.get()` documents the contract: `None` means not found, `ConnectionError` when disconnected, other backend errors propagate
## Motivation
Previously, `get()` returned `None` for both "object not found" and real failures such as permission errors or network issues. That made caller logic ambiguous and differed from Redis `get()`, where missing keys return `None` and other errors propagate.
## Behavior change
| Condition | Before | After |
|-----------|--------|-------|
| `NoSuchKey` | `None` | `None` (unchanged) |
| Other `S3Error` | `None` (logged) | Re-raised |
| Read/network errors | `None` (logged) | Re-raised |
| Not connected | `ConnectionError` | `ConnectionError` (unchanged) |
This is a small breaking change for callers that treated `None` as a generic failure indicator.
## Test plan
- [x] `uv run pytest tests/unit/minio_adapter_test.py -v`
- [x] `uv run pytest tests/integration/minio_adapter_test.py -v -k "get or reraise"`
Return None only for missing objects and re-raise other S3 and network failures so callers can distinguish not-found from real errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
MinioAdapter.get()now returnsNoneonly for missing objects (NoSuchKey)S3Errorand unexpected failures are re-raised instead of being logged and swallowedObjectRepositoryInterface.get()documents the contract:Nonemeans not found,ConnectionErrorwhen disconnected, other backend errors propagateMotivation
Previously,
get()returnedNonefor both "object not found" and real failures such as permission errors or network issues. That made caller logic ambiguous and differed from Redisget(), where missing keys returnNoneand other errors propagate.Behavior change
NoSuchKeyNoneNone(unchanged)S3ErrorNone(logged)None(logged)ConnectionErrorConnectionError(unchanged)This is a small breaking change for callers that treated
Noneas a generic failure indicator.Test plan
uv run pytest tests/unit/minio_adapter_test.py -vuv run pytest tests/integration/minio_adapter_test.py -v -k "get or reraise"Test Coverage Report: