fix(datastore): improve error message for subscriptions missing requi… - #14908
Open
kkbot122 wants to merge 1 commit into
Open
fix(datastore): improve error message for subscriptions missing requi…#14908kkbot122 wants to merge 1 commit into
kkbot122 wants to merge 1 commit into
Conversation
…red fields Adds guidance to the 'Skipping incoming subscription' warning to help developers understand this typically happens when a mutation is performed outside of DataStore without requesting all required fields. Fixes aws-amplify#8766
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Improves the warning message logged when DataStore skips an incoming subscription due to GraphQL errors in the response. Previously, the log only showed:
This gave developers no actionable context, and as noted in issue #8766, this confusion came up repeatedly in the Discord community — usually because a mutation was performed outside of DataStore (e.g. directly through AppSync) without requesting all the fields DataStore needs to sync correctly.
This PR adds guidance to the warning message explaining the likely cause and pointing to the DataStore sync documentation, so developers can self-diagnose instead of needing to ask in Discord/GitHub each time.
No logic changes — only the warning message text was updated. The underlying skip behavior is unchanged.
Issue #, if available
Fixes #8766
Description of how you validated changes
Ran the existing
subscription.test.tssuite for thedatastorepackage locally:All 19 existing tests pass with no regressions. The change only affects the text of a
logger.warncall and does not alter any subscription/sync logic, so no existing test assertions were impacted.Checklist
yarn testpasses