Skip to content

(compat) Added a new error type for layer incompatibility error#25784

Merged
agarwal-navin merged 6 commits intomicrosoft:mainfrom
agarwal-navin:layerIncompatibilityErrorType
Nov 3, 2025
Merged

(compat) Added a new error type for layer incompatibility error#25784
agarwal-navin merged 6 commits intomicrosoft:mainfrom
agarwal-navin:layerIncompatibilityErrorType

Conversation

@agarwal-navin
Copy link
Contributor

@agarwal-navin agarwal-navin commented Oct 31, 2025

Follow up to #25706.

Added a new error type layerIncompatibilityError which will be used when a layer incompatibility is detected between Fluid layers. This will help applications detect when an error is because of layer incompatibility and take appropriate steps.

The new error type is added as an legacy / alpha API. Since the FluidErrorTypes type is legacy / beta, added a FluidErrorTypesAlpha type where new error types will be added to stage them. Once the breaking change window has passed, error types will be moved to FluidErrorTypes.

AB#51811

@agarwal-navin agarwal-navin requested a review from a team as a code owner October 31, 2025 17:01
@github-actions github-actions bot added changeset-present base: main PRs targeted against main branch labels Oct 31, 2025
@agarwal-navin agarwal-navin changed the title (compat) Add new error type for layer incompatibility error (compat) Added a new error type for layer incompatibility error Oct 31, 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 refactors the LayerIncompatibilityError implementation by introducing a new dedicated error type layerIncompatibilityError in the FluidErrorTypesAlpha enum, replacing the previous approach that used a symbol-based identification mechanism with the generic usageError type.

Key changes:

  • Introduced FluidErrorTypesAlpha enum with a dedicated layerIncompatibilityError type
  • Simplified isLayerIncompatibilityError type guard to check the error type directly
  • Changed LayerIncompatibilityError class to extend LoggingError instead of UsageError

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/common/core-interfaces/src/error.ts Added FluidErrorTypesAlpha enum with layerIncompatibilityError type; removed the symbol-based identification; updated ILayerIncompatibilityError interface to use the new error type
packages/common/core-interfaces/src/index.ts Added export for FluidErrorTypesAlpha and reorganized exports
packages/utils/telemetry-utils/src/error.ts Updated LayerIncompatibilityError to extend LoggingError and use the new FluidErrorTypesAlpha.layerIncompatibilityError type; removed symbol import
packages/utils/telemetry-utils/src/fluidErrorBase.ts Simplified isLayerIncompatibilityError to check error type directly; removed symbol-based checks; updated imports
.changeset/sweet-groups-love.md Added changeset documenting the new error type

Copy link
Contributor

Choose a reason for hiding this comment

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

Worth specifying when an app author can expect this error to be thrown.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the comment.


/**
* New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes.
* @legacy @alpha
Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't look like this package is setup for legacy/alpha exports. there should be a api-report generated. look at other packages, and PRs. I don't know if docs ever got writtern.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added api report for alpha APIs. @jason-ha Could you please take a look if it looks fine.

@github-actions github-actions bot added the public api change Changes to a public API label Oct 31, 2025
@github-actions github-actions bot added the area: tests Tests to add, test infrastructure improvements, etc label Oct 31, 2025
Copy link
Contributor

@jason-ha jason-ha left a comment

Choose a reason for hiding this comment

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

Can also see #25790 that is adding legacy alpha API as reference.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🔗 Found some broken links! 💔

Run a link check locally to find them. See
https://github.com/microsoft/FluidFramework/wiki/Checking-for-broken-links-in-the-documentation for more information.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

 ELIFECYCLE  Command failed with exit code 1.

Copy link
Contributor

@Abe27342 Abe27342 left a comment

Choose a reason for hiding this comment

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

Code changes look good. I didn't look closely at added configuration files or changeset.

Copy link
Contributor

@jzaffiro jzaffiro left a comment

Choose a reason for hiding this comment

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

One small nit but docs look good

"@fluidframework/container-definitions": minor
"__section": legacy
---
Added a new Fluid error type layerIncompatibilityError
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Added a new Fluid error type layerIncompatibilityError
Add a new Fluid error type layerIncompatibilityError

@agarwal-navin agarwal-navin merged commit 01d568b into microsoft:main Nov 3, 2025
46 checks passed
@agarwal-navin agarwal-navin deleted the layerIncompatibilityErrorType branch November 3, 2025 22:33
agarwal-navin added a commit that referenced this pull request Dec 17, 2025
… to @legacy @beta (#26068)

This PR upgrades the `layerIncompatibilityError` error type and
`ILayerIncompatibilityError` interface from legacy alpha to legacy beta
status. The error type was originally introduced by
#25784 in release 2.72.0
and is now being promoted to a more stable API level.
- Moved `layerIncompatibilityError` from `FluidErrorTypesAlpha` to
`FluidErrorTypes`.
- Updated the `ILayerIncompatibilityError` interface to reference the
beta error type.
- Updated all usages across the codebase to use the new beta references.


[AB#54417](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/54417)
anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
…osoft#25784)

Follow up to microsoft#25706.

Added a new error type `layerIncompatibilityError` which will be used
when a layer incompatibility is detected between Fluid layers. This will
help applications detect when an error is because of layer
incompatibility and take appropriate steps.

The new error type is added as an legacy / alpha API. Since the
`FluidErrorTypes` type is legacy / beta, added a `FluidErrorTypesAlpha`
type where new error types will be added to stage them. Once the
breaking change window has passed, error types will be moved to
`FluidErrorTypes`.


[AB#51811](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/51811)
anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
… to @legacy @beta (microsoft#26068)

This PR upgrades the `layerIncompatibilityError` error type and
`ILayerIncompatibilityError` interface from legacy alpha to legacy beta
status. The error type was originally introduced by
microsoft#25784 in release 2.72.0
and is now being promoted to a more stable API level.
- Moved `layerIncompatibilityError` from `FluidErrorTypesAlpha` to
`FluidErrorTypes`.
- Updated the `ILayerIncompatibilityError` interface to reference the
beta error type.
- Updated all usages across the codebase to use the new beta references.


[AB#54417](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/54417)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch changeset-present public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments