Skip to content

fix(datastore): improve error message for subscriptions missing requi… - #14908

Open
kkbot122 wants to merge 1 commit into
aws-amplify:mainfrom
kkbot122:fix/datastore-mutation-error-message
Open

fix(datastore): improve error message for subscriptions missing requi…#14908
kkbot122 wants to merge 1 commit into
aws-amplify:mainfrom
kkbot122:fix/datastore-mutation-error-message

Conversation

@kkbot122

@kkbot122 kkbot122 commented Aug 9, 2026

Copy link
Copy Markdown

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:

DataStore - Skipping incoming subscription. Messages: <raw error messages>

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.ts suite for the datastore package locally:

npx jest subscription

All 19 existing tests pass with no regressions. The change only affects the text of a logger.warn call and does not alter any subscription/sync logic, so no existing test assertions were impacted.

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

…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
@kkbot122
kkbot122 requested a review from a team as a code owner August 9, 2026 09:50
@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 94a3934

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

Change the error shown when a mutation outside of DataStore doesn't include all fields

1 participant