Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
TOO_MANY_REQUESTS_ERROR: int = 429
SERVICE_ERROR: int = 500
INVALID_PARAMETER_VALUE_EXCEPTION: str = "InvalidParameterValueException"
INVALID_CHECKPOINT_TOKEN_PREFIX: str = "Invalid Checkpoint Token"
INVALID_CHECKPOINT_TOKEN_PREFIX: str = "Invalid checkpoint token"

# Non-retryable customer error codes that arrive as non-4xx (e.g. HTTP 502) from Lambda.
# Unlike typical 5xx errors, these require customer intervention (e.g., fixing
Expand Down Expand Up @@ -162,7 +162,7 @@ def _classify_error_category(
These arrive as HTTP 502 but require customer intervention to fix.
- 4xx errors → EXECUTION, except:
- 429 (TooManyRequests) → INVOCATION (throttling is transient)
- InvalidParameterValueException with "Invalid Checkpoint Token" → INVOCATION
- InvalidParameterValueException with "Invalid checkpoint token" (exact match) → INVOCATION
(stale token from a concurrent checkpoint; next invocation gets a fresh token)
- 5xx, network errors → INVOCATION
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def test_checkpoint_error():


def test_checkpoint_error_classification_invalid_token_invocation():
"""Test 4xx InvalidParameterValueException with Invalid Checkpoint Token is invocation error."""
"""Test 4xx InvalidParameterValueException with "Invalid checkpoint token" error message is an invocation error."""
error_response = {
"Error": {
"Code": "InvalidParameterValueException",
"Message": "Invalid Checkpoint Token: token expired",
"Message": "Invalid checkpoint token: token expired",
},
"ResponseMetadata": {"HTTPStatusCode": 400},
}
Expand Down
Loading