-
Notifications
You must be signed in to change notification settings - Fork 893
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
Firestore: Fix "missing index" error message #6712
Conversation
🦋 Changeset detectedLatest commit: d4012d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
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.
This fix looks perfect to me. Nice work! Just a few minor comments.
packages/firestore/src/platform/browser_lite/fetch_connection.ts
Outdated
Show resolved
Hide resolved
packages/firestore/src/platform/browser_lite/fetch_connection.ts
Outdated
Show resolved
Hide resolved
packages/firestore/src/platform/browser_lite/fetch_connection.ts
Outdated
Show resolved
Hide resolved
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.
Add a changeset please.
Great work! What an elegant fix.
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.
Just one tiny change to the changelog entry. Otherwise LGTM.
Fix a bug where missing index error message is not displayed as expected.
Expected error message
It should display "The query requires an index. Please create it here: http://.....". By clicking the link, user will be directed to console where they can create the required index.
Current error message:
Cause
when server respond to the request with missing index, error object is wrapped inside an array. By trying to read the error message field directly from the array, it always fails and get "undefined".
So, extract the error object from the array before reading the error message field.
Fixes #6613