Skip to content

Conversation

@jason-ha
Copy link
Contributor

but do not log cause property itself.

…ping errors

but do not log `cause` property itself.
@jason-ha jason-ha requested a review from a team as a code owner September 18, 2025 21:02
Copilot AI review requested due to automatic review settings September 18, 2025 21:02
@github-actions github-actions bot added changeset-present base: main PRs targeted against main branch labels Sep 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for preserving inner errors as the cause property when wrapping errors, following the ES2022 Error.cause standard. The key change ensures that when errors are wrapped, the original error is retained for debugging purposes while preventing the cause property itself from being logged as telemetry data.

Key changes:

  • Added cause property to IFluidErrorBase interface with comprehensive documentation
  • Modified wrapError function to set the cause property to the inner error
  • Updated LoggingError class to exclude the cause property from telemetry logging
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/utils/telemetry-utils/src/fluidErrorBase.ts Added cause property declaration to IFluidErrorBase interface with ES2022 compatibility documentation
packages/utils/telemetry-utils/src/errorLogging.ts Modified wrapError to set cause property and updated LoggingError to exclude cause from telemetry
packages/utils/telemetry-utils/src/test/errorLogging.spec.ts Added test to verify cause property is set but not included in telemetry properties
.changeset/nasty-dots-dress.md Added changeset documenting the new cause property feature

@jason-ha jason-ha enabled auto-merge (squash) September 19, 2025 18:02
@jason-ha jason-ha merged commit c69d56d into main Sep 19, 2025
45 checks passed
@jason-ha jason-ha deleted the test/client/retain_inner_error_as_cause branch September 19, 2025 20:41
anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

base: main PRs targeted against main branch changeset-present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants