Skip to content

Comments

Fix reducer errors to return message not stack trace#3965

Merged
rekhoff merged 1 commit intomasterfrom
rekhoff/fix-csharp-reducer-errors-containing-stack-traces
Jan 9, 2026
Merged

Fix reducer errors to return message not stack trace#3965
rekhoff merged 1 commit intomasterfrom
rekhoff/fix-csharp-reducer-errors-containing-stack-traces

Conversation

@rekhoff
Copy link
Contributor

@rekhoff rekhoff commented Jan 7, 2026

Description of Changes

This PR fixes a C# reducer error-reporting issue where exceptions thrown in reducers were returned to clients with full stack traces, as reported in #3959.

  • Updated the C# reducer host-call error serialization to return only Exception.Message (instead of Exception.ToString()), preventing server-side stack traces from being leaked to clients.
  • Added a C# regression-test client assertion to validate reducer failures do not contain stack traces:
    • exception.Message matches the thrown message exactly
    • the message does not contain newlines or " at " stack-trace markers

API and ABI breaking changes

None.

  • No schema or wire-format changes.
  • Behavior change is limited to the contents of reducer error strings returned to clients (stack traces removed).

Expected complexity level and risk

2 - Low

  • Change is isolated to C# reducer error formatting plus a regression assertion.
  • Removes unintended information exposure without affecting reducer success paths.

Testing

  • Ran C# regression-tests client; verified reducer error message is preserved and stack trace is not present.

@rekhoff rekhoff self-assigned this Jan 7, 2026
@rekhoff rekhoff marked this pull request as ready for review January 7, 2026 23:25
Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

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

This one seems simple enough, thanks for the regression test 👍 I haven't tested this myself but this seems quite trivial

@rekhoff rekhoff added this pull request to the merge queue Jan 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 9, 2026
@rekhoff rekhoff added this pull request to the merge queue Jan 9, 2026
Merged via the queue into master with commit 952402d Jan 9, 2026
29 checks passed
@rekhoff rekhoff deleted the rekhoff/fix-csharp-reducer-errors-containing-stack-traces branch January 9, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants