-
Notifications
You must be signed in to change notification settings - Fork 901
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
Catch getDefaults() errors and do not throw #6686
Conversation
🦋 Changeset detectedLatest commit: 0aaf837 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 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.
LGTM
Due to various frameworks and environments, we have been encountering a lot of special cases not accounted for in
getDefaults()
(such asprocess
existing butprocess.env
not existing in Nuxt 3, ordocument
existing butdocument.cookie
throwing in Angular Universal).Adding an overall try/catch block to
getDefaults()
so that if it runs into any errors we haven't thought of, it won't block execution of the rest of Firebase. It will log a console.info so we can find out about these cases and account for them.Also added a separate catch specifically for the Angular Universal case. Yes, this would be caught by the overall try/catch already, but I'd like to put in the specific cases as we find them so we know the specifics of the various environments we're dealing with, as this knowledge will help us with SSR support going forward.
Fixes #6677