1313TOO_MANY_REQUESTS_ERROR : int = 429
1414SERVICE_ERROR : int = 500
1515INVALID_PARAMETER_VALUE_EXCEPTION : str = "InvalidParameterValueException"
16- INVALID_CHECKPOINT_TOKEN_PREFIX : str = "invalid checkpoint token"
16+ INVALID_CHECKPOINT_TOKEN_PREFIX : str = "Invalid checkpoint token"
1717
1818# Non-retryable customer error codes that arrive as non-4xx (e.g. HTTP 502) from Lambda.
1919# Unlike typical 5xx errors, these require customer intervention (e.g., fixing
@@ -162,7 +162,7 @@ def _classify_error_category(
162162 These arrive as HTTP 502 but require customer intervention to fix.
163163 - 4xx errors → EXECUTION, except:
164164 - 429 (TooManyRequests) → INVOCATION (throttling is transient)
165- - InvalidParameterValueException with "Invalid checkpoint token" (case-insensitive ) → INVOCATION
165+ - InvalidParameterValueException with "Invalid checkpoint token" (exact match ) → INVOCATION
166166 (stale token from a concurrent checkpoint; next invocation gets a fresh token)
167167 - 5xx, network errors → INVOCATION
168168 """
@@ -180,9 +180,9 @@ def _classify_error_category(
180180 and error
181181 and not (
182182 (error .get ("Code" ) or "" ) == INVALID_PARAMETER_VALUE_EXCEPTION
183- and (error .get ("Message" ) or "" )
184- . casefold ()
185- . startswith ( INVALID_CHECKPOINT_TOKEN_PREFIX )
183+ and (error .get ("Message" ) or "" ). startswith (
184+ INVALID_CHECKPOINT_TOKEN_PREFIX
185+ )
186186 )
187187 ):
188188 return DurableApiErrorCategory .EXECUTION
0 commit comments