-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: add null check to prevent API response errors (issue #13941) #378
Conversation
🦋 Changeset detectedLatest commit: 672ea2f The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this change looks good and makes sense. Two things.
- Can the title of this change be made following the conventional commit format so that when we squash the change the commit message to the main repo will be conventional.
- How was this change validated? Want to make sure we reproduced the error case and confirmed this fix with some level of validation documention added the the description before this gets merged.
Issue #, if available: aws-amplify/amplify-js#13941 (comment)
Description of changes: This PR adds a null check to prevent potential errors in API response handling. The following changes have been made:
Validation: I reproduced the issue by simulating null data scenarios in the local environment, including cases with empty API responses. After applying the fix, I reran the integration tests and confirmed that the null data no longer caused errors.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.