Skip to content

Commit 7297ca6

Browse files
committed
docs(core): state that a failed key is not always a page title
- StoreEntityResult.failed falls back to the entity name, uuid or 'unknown' when the title or the namespace cannot be resolved - those fallback forms became reachable with the two new raises
1 parent 88be481 commit 7297ca6

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎src/osw/core.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,8 +1709,11 @@ class StoreEntityResult(OswBaseModel):
17091709
"""The pages that have been successfully stored, keyed by full page title.
17101710
On partial failure this contains only the successfully-stored pages."""
17111711
failed: Dict[str, Exception] = {}
1712-
"""Entities that could not be stored, keyed by full page title and mapped to
1713-
the exception that caused the failure. Empty on full success."""
1712+
"""Entities that could not be stored, mapped to the exception that caused the
1713+
failure. Empty on full success. The key is the full page title where one could
1714+
be determined. For an entity whose title or namespace could not be resolved it
1715+
falls back to the entity name, then to its uuid, then to 'unknown', so do not
1716+
parse this key as 'namespace:title'."""
17141717

17151718
class Config:
17161719
arbitrary_types_allowed = True

0 commit comments

Comments
 (0)