Skip to content

💥 Standardize Nexus Operation Input Arg. Deserialization Failure#615

Merged
cretz merged 4 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:issue-614
Feb 24, 2026
Merged

💥 Standardize Nexus Operation Input Arg. Deserialization Failure#615
cretz merged 4 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:issue-614

Conversation

@Quinn-With-Two-Ns
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Feb 23, 2026

Standardize Nexus Operation Input Arg. Deserialization Failure. Previously dotnet was treating all failures as retryable which is different then all other core based SDKs. After consolation with the SDK team, the agreed behaviour is in core based SDKs failures from the payload converter are non retry able (BAD_REQUEST), and failures in the codec are retry able (INTERNAL) and ApplicationFailureException should be respected.

see also: temporalio/features#762

closes #614


Note

Medium Risk
Changes Nexus handler error classification and retry behavior, which can alter production failure/retry semantics for Nexus operations; scope is contained and backed by targeted tests.

Overview
Nexus operation input deserialization now explicitly runs PayloadCodec.DecodeAsync (when configured) before PayloadConverter.ToValue, and maps failures to standardized HandlerExceptions: codec/decode errors become retryable INTERNAL, while converter/type/format errors become non-retryable BAD_REQUEST; ApplicationFailureException is allowed to propagate unchanged.

Tests were updated to assert workflows fail immediately for bad argument types (non-retryable), and new coverage was added to verify codec failures trigger retries while converter failures do not.

Written by Cursor Bugbot for commit 296cc1e. This will update automatically on new commits. Configure here.

@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review February 23, 2026 00:49
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner February 23, 2026 00:49
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 392052069b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@cretz cretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but will see if @jmaeagle99 wants to look/merge

{
value = null;
}
var payload = await dataConverter.ToPayloadAsync(value).ConfigureAwait(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To confirm, we consider serialization failures to keep the logic of use app error or fall through to internal on conversion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is consistent across all SDKs

{
throw;
}
catch (Exception e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the when keyword to exclude exception types e.g. catch (Exception e) when (e is not ApplicationFailureException).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah neat, done!

@Quinn-With-Two-Ns Quinn-With-Two-Ns changed the title Standardize Nexus Operation Input Arg. Deserialization Failure 💥 Standardize Nexus Operation Input Arg. Deserialization Failure Feb 23, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants