generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Context
GitHub Reference: lambda_service.py#L833
Standardize how None/null CheckpointToken values are handled throughout the system. Align with TypeScript.
Technical Requirements
- Define consistent behavior for null checkpoint tokens
- Update all checkpoint token handling code
- Ensure proper validation and error messages
- Handle edge cases in token lifecycle
Implementation Details
- File:
src/aws_durable_execution_sdk_python/lambda_service.py - Line: Around line 833
- Validation: Add null checks and appropriate defaults
def handle_checkpoint_token(self, token: str | None) -> str:
"""Standardize checkpoint token handling."""
if token is None:
# Define standard behavior for null tokens
logger.warning("Checkpoint token is None, using empty string")
return ""
# OR?
# raise FatalError(f"Checkpoint token must be string, got {type(token)}")
return token.strip() # Normalize whitespaceAcceptance Criteria
- Align with TypeScript on behavior
- Consistent null token handling across codebase
- Clear validation and error messages
- Edge cases properly handled
- Behavior is documented
- Tests cover null token scenarios
Priority: Low
Estimated Effort: 0.5 day
Metadata
Metadata
Assignees
Labels
No labels