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

add catch to cachDB fallback, defer admin store init #877

Merged
merged 2 commits into from
Jan 16, 2020

Conversation

chrismclarke
Copy link
Member

The added cache fallback methods from PR #872 produced errors when queries were executed on the cache that either:

a) Didn't have a corresponding operation. Basic queries have been created for things like >, ==, <, however the firebase custom array-contains query has not been created and was throwing an error. This message has been made more clear, and a better catch used to avoid.

b) Didn't have indexes on the fields required to query. By default any searches on dexie can only be performed on fields that are specified in the schema, which didn't include things like userRoles or _authID. This again is now handled more gracefully.

Additionally, both errors were being thrown on launch from the admin store. As the admin store isn't required for most users I've changed the init function to only fire on admin page load.

Hopefully this should pass the tests, and if so a new PR might need to be made to production (or can try merge and see if it builds)

@chrismclarke chrismclarke requested a review from BenGamma January 15, 2020 23:24
@cypress
Copy link

cypress bot commented Jan 15, 2020



Test summary

30 0 0 0


Run details

Project onearmy-community-platform
Status Passed
Commit aa06a44
Started Jan 15, 2020 11:30 PM
Ended Jan 15, 2020 11:36 PM
Duration 06:21 💡
OS Linux Ubuntu Linux - 14.04
Browser Electron 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@BenGamma BenGamma merged commit b9a14c0 into master Jan 16, 2020
@BenGamma BenGamma deleted the hotfix/mapping-not-created branch January 16, 2020 08:15
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