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

[sitecore-jss-nextjs] Rework promises in context implementation #1716

Merged
merged 6 commits into from
Jan 17, 2024

Conversation

art-alexeyenko
Copy link
Contributor

@art-alexeyenko art-alexeyenko commented Jan 16, 2024

Description / Motivation

Follow up to context changes.

  • Ensure SDK init methods can throw without halting context init
  • Ensure getSDK method can properly resolve and reject
  • Ensure relevant message is passed when getSDK rejects

Testing Details

  • Unit Test Adjusted
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@art-alexeyenko art-alexeyenko requested a review from a team January 16, 2024 23:45
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

From my understanding this implementation doesn't really change an error handling behavior, or you didn't update unit tests accordingly. We need to discuss it further, maybe I missed some case
(Update: had a sync call and discussed concerns that appeared and changes to be made)

Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Very minor suggestion :)

packages/sitecore-jss-nextjs/src/context/context.ts Outdated Show resolved Hide resolved
@art-alexeyenko art-alexeyenko merged commit 7b37f0b into dev Jan 17, 2024
1 check passed
@art-alexeyenko art-alexeyenko deleted the bug/jss-1396-rework-promises-in-context branch January 17, 2024 16:13
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.

2 participants