(compat) Added a new error type for layer incompatibility error#25784
Conversation
There was a problem hiding this comment.
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
FluidErrorTypesAlphaenum with a dedicatedlayerIncompatibilityErrortype - Simplified
isLayerIncompatibilityErrortype guard to check the error type directly - Changed
LayerIncompatibilityErrorclass to extendLoggingErrorinstead ofUsageError
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 |
There was a problem hiding this comment.
Worth specifying when an app author can expect this error to be thrown.
There was a problem hiding this comment.
Updated the comment.
|
|
||
| /** | ||
| * New error types that are still in alpha stage. Once stabilized, they will be moved to FluidErrorTypes. | ||
| * @legacy @alpha |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Added api report for alpha APIs. @jason-ha Could you please take a look if it looks fine.
|
🔗 Found some broken links! 💔 Run a link check locally to find them. See linkcheck output |
Abe27342
left a comment
There was a problem hiding this comment.
Code changes look good. I didn't look closely at added configuration files or changeset.
jzaffiro
left a comment
There was a problem hiding this comment.
One small nit but docs look good
| "@fluidframework/container-definitions": minor | ||
| "__section": legacy | ||
| --- | ||
| Added a new Fluid error type layerIncompatibilityError |
There was a problem hiding this comment.
| Added a new Fluid error type layerIncompatibilityError | |
| Add a new Fluid error type layerIncompatibilityError |
… 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)
…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)
… 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)
Follow up to #25706.
Added a new error type
layerIncompatibilityErrorwhich 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
FluidErrorTypestype is legacy / beta, added aFluidErrorTypesAlphatype where new error types will be added to stage them. Once the breaking change window has passed, error types will be moved toFluidErrorTypes.AB#51811