New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE] CXSPA-6939 (PoC) Handling breaking changes related to SSR Error Handling #18789
base: epic/ssr-error-handling
Are you sure you want to change the base?
[DO NOT MERGE] CXSPA-6939 (PoC) Handling breaking changes related to SSR Error Handling #18789
Conversation
projects/core/src/error-handling/effects-error-handler/cx-error-handler.effect.ts
Outdated
Show resolved
Hide resolved
@@ -24,6 +23,7 @@ import { StateModule } from './state/state.module'; | |||
|
|||
@NgModule({ | |||
imports: [ | |||
// breaking change - HttpErrorHandlerInterceptor may have featureService inside manipulate the behavior (implemented) OR we can inform in docs that this module has to be imported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FeatureToggles for the win. It's easy, simple, documented.
Importing extra modules by customers is an extra overhead. It should be required only in cases when bundlesize of importing this module by default would be considerable.
// possible ways of handling breaking changes in ALL actions: | ||
// - introduce CustomerSearchFailV2 and deprecate old class | ||
// - overload the constructor of CustomerSearchFail and handle the change there together with deprecating he old one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry. I don't get the problem - what a breaking change we have? TS Type? Behavior?
And how we're mitigating it?
And if introducing any temporary solutions (e.g. deprecated things), when will we remove them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed, usage of a new type in the constructor or making the constructor's params required provide breaking changes.
Action points for such cases:
- revert usage of new
ErrorActionType
type - overload the constructor and deprecate the deprecate version with the optional
error/payload
param - create a fallback if the error passed to the constructor is
undefined
(assignnew Error
)
…ing-breaking-changes
80b3e47
to
8e05980
Compare
This PR contains PoC on how to handle breaking changes introduced by features required for SSR Error Handling: