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: handle http errors in ssr #17624

Merged

Conversation

kpawelczak
Copy link
Contributor

No description provided.

Platonn and others added 4 commits July 6, 2023 14:15
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
@kpawelczak kpawelczak requested a review from a team as a code owner July 11, 2023 11:07
@cla-assistant
Copy link

cla-assistant bot commented Jul 11, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ Platonn
✅ kpawelczak
❌ github-actions[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@kpawelczak kpawelczak merged commit 0357962 into epic/ssr-error-handling Jul 25, 2023
7 of 8 checks passed
@kpawelczak kpawelczak deleted the feat/CXSPA-3779-http-error-handler branch July 25, 2023 10:58
Zeyber pushed a commit that referenced this pull request Apr 30, 2024
Co-authored-by: Krzysztof Platis <platonn.git@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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

2 participants