Skip to main content

Exception (Error)

Summary of conditions that lead to which exception or return value. Tests align with this list.

Filing / Field (metaclass, init, set)

ConditionResultNotes
Required fields (id, source, checksum, etc.) missingFilingRequiredError; errors / fields contain what is missing
Explicit None for a required fieldFilingRequiredError
Value with wrong type for a fieldFieldValidationError; includes field, expected_type, actual_type
Change an immutable field after initFieldImmutableError; includes field, current_value, attempt_value
Multiple field validation errorsFilingValidationError or FilingImmutableError; errors / fields list them
Fields with default may be omittedOK; default used when omitted
Extended class missing required fieldsSame exceptions as above

Filing (to_dict / from_dict)

ConditionResultNotes
from_dict with missing required keysFilingRequiredError etc.
from_dict with wrong typeFieldValidationError etc.

Collection.add

ConditionResultNotes
SHA256 of content does not match filing.checksumCollectionChecksumMismatchError; includes filing_id, actual_checksum, expected_checksum
add again with same id already addedOverwrite allowed: catalog index is skipped, storage is overwritten; returns (filing, path)

Collection.get_filing / get_content / get

ConditionResultNotes
Non-existent idget_filing: None; get_content: None; get: (None, None, None) (3rd element is path: str | None)

Catalog.search / Catalog.count

ConditionResultNotes
expr が Python の bool(例: Field("x") == "a" & Field("y") == "b" の誤った括弧)CatalogExprTypeError& / | の優先順位に注意

Locator.resolve

ConditionResultNotes
Filing cannot be resolved (no path)LocatorPathResolutionError (raised inside Collection.add)

Exception message format

  • Base: FinoFilingException. message includes the prefix "[Fino Filing] ".
  • FilingValidationError / FilingImmutableError / FilingRequiredError: str(exception) may include errors as newline-separated lines (spec only guarantees that they are present; exact format is not part of the spec).

See also