Skip to content

Commit 8ef400a

Browse files
committed
ValueError -> LookupError
1 parent 42d0c54 commit 8ef400a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

synapseclient/models/submission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ async def _fetch_latest_entity(
494494

495495
return entity_info
496496
except Exception as e:
497-
raise ValueError(
497+
raise LookupError(
498498
f"Unable to fetch entity information for {self.entity_id}: {e}"
499499
) from e
500500

tests/integration/synapseclient/models/async/test_submission_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ async def test_fetch_latest_entity_success_async(self):
555555

556556
# Note: This test would need a real entity ID to work in practice
557557
# For now, we test the validation logic
558-
with pytest.raises(ValueError, match="Unable to fetch entity information"):
558+
with pytest.raises(LookupError, match="Unable to fetch entity information"):
559559
await submission._fetch_latest_entity(synapse_client=self.syn)
560560

561561
async def test_fetch_latest_entity_without_entity_id_async(self):

0 commit comments

Comments
 (0)