Skip to content
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

feat: CXSPA-2066 SSR Error Handling #18742

Draft
wants to merge 21 commits into
base: develop
Choose a base branch
from
Draft

Conversation

pawelfras
Copy link
Contributor

TBD

closes CXSPA-2066

Platonn and others added 15 commits July 10, 2023 10:54
Previous behavior: When `/products` endpoint returned a http error, the code broke in [this line](https://github.com/SAP/spartacus/blob/ed1e1a78c488b1e1214491ffa736612287f8cf70/projects/core/src/product/store/effects/product.effect.ts#L77), complaining that `this` is undefined.

Fix: Preserve the context of `this` which was lost in [this line](https://github.com/SAP/spartacus/blob/ed1e1a78c488b1e1214491ffa736612287f8cf70/projects/core/src/product/store/effects/product.effect.ts#L52)

The problem was revealed only after we implemented [CXSPA-2251](https://jira.tools.sap/browse/CXSPA-2251) where we referenced `this` by adding `this.logger` to the method `ProductEffects.productLoadEffect`

fixes https://jira.tools.sap/browse/CXSPA-3902
Co-authored-by: Krzysztof Platis <platonn.git@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Krzysztof Platis <platonn.git@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Conflicts:
#	projects/core/src/product/store/actions/product-references.action.ts
#	projects/core/src/product/store/actions/product-reviews.action.ts
#	projects/core/src/product/store/effects/product-reviews.effect.ts
#	projects/core/src/state/utils/entity-loader/entity-loader.action.ts
This pull request introduces methodologies for integrating multiple error interceptors that manage errors within the Server-Side Rendering (SSR) framework. This architectural augmentation preserves backward compatibility, mitigating any potential disruptions for end-users upon the incorporation of new error interceptors into the system.

With the introduction of this enhancement, it becomes easier for users to include new error interceptors, giving them the flexibility to determine the order in which these interceptors are applied within the system. This priority setting allows users to control how these interceptors operate and influence the workflow of the system.

The order is:
High priority
Normal or no priority
Low priority

Preserves the original order within a group of interceptors with the same priority.
@pawelfras pawelfras requested a review from a team as a code owner April 18, 2024 14:07
@pawelfras pawelfras requested a review from a team April 18, 2024 14:07
@pawelfras pawelfras requested review from a team as code owners April 18, 2024 14:07
@github-actions github-actions bot marked this pull request as draft April 18, 2024 14: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.

None yet

4 participants