Skip to content

Enum Refactoring for Session(Sequence)/TopicWriter Error Handling #233

@fdicorato

Description

@fdicorato

Refactor existing error policy enums to align with hierarchical error handling.

Tasks:

  • Create a new SessionLevelErrorPolicy which maps OnErrorPolicy.
    • Keep existing enum values (DELETE, REPORT).
    • Maintain backward compatibility and document impact.
  • define OnErrorPolicy deprecated (ensures backward-compatibility):
    from typing_extensions import deprecated
    @deprecated(
       "OnErrorPolicy is deprecated since v0.3.0; use SessionLevelErrorPolicy instead. "
       "It will be removed in v0.4.0."
     )
     class OnErrorPolicy(Enum): ...
  • Implement new enum TopicLevelErrorPolicy with values:
    • FINALIZE (default)
    • IGNORE
    • RAISE
  • Ensure TopicLevelErrorPolicy is accessible via the public SDK API.
  • Write exhaustive class and enum values documentation (see current OnErrorPolicy docsrtrings)

This must complete Acceptance Criteria 1 & 2. (issue #214 )

Pull Requests must be targeted to release/0.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests that update python coderefactoringRequest/suggest a refactoring of a code portionsdkActivity related to SDKs

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions