fix: map Nexus start_activity validation failures to BAD_REQUEST - #1795
Closed
tekkaya wants to merge 1 commit into
Closed
fix: map Nexus start_activity validation failures to BAD_REQUEST#1795tekkaya wants to merge 1 commit into
tekkaya wants to merge 1 commit into
Conversation
tekkaya
force-pushed
the
nexus-saa-gap-fixes
branch
from
August 31, 2026 18:23
7a57af2 to
74d57b9
Compare
start_activity's preconditions (missing timeout, negative start_delay) raised a bare ValueError. Inside a Nexus operation handler this fell through _exception_to_handler_error to a retryable HandlerErrorType INTERNAL, causing needless redelivery until schedule_to_close_timeout and discarding the real message. Raise a dedicated _StartActivityInputError instead so the Nexus worker can classify it as a non-retryable BAD_REQUEST. It also inherits from TemporalError so it's catchable alongside the rest of the SDK's exception hierarchy; ValueError catchability for existing callers is unaffected. Adds unit tests covering both preconditions and the _exception_to_handler_error classification (tests/nexus/, alongside the other worker._nexus unit tests), plus a CHANGELOG entry. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tekkaya
force-pushed
the
nexus-saa-gap-fixes
branch
from
August 31, 2026 18:32
74d57b9 to
4cc3016
Compare
tekkaya
marked this pull request as ready for review
August 31, 2026 19:51
Author
|
This is an intended behaviour, closing this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
start_activity's preconditions (missing timeout, negativestart_delay) now raise a dedicated_StartActivityInputError.worker/_nexus.py's_exception_to_handler_errorrecognizes this type and converts it to a non-retryablenexusrpc.HandlerError(BAD_REQUEST).Why?
Inside a Nexus operation handler starting an activity when both timeout are missing or a negative
start_delayis given in start activity options, the raised ValueError was falling through to the generic, retryableHandlerErrorType.INTERNALbranch, discarding the real message and causing the server to redeliver the deterministically-failing request untilschedule_to_close_timeoutelapsed.Checklist
Closes Argument validation gap in Nexus + SAA
How was this tested:
No public API changes;
_StartActivityInputErroris private.