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

feat(logging): show collection in errors #643

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Gsiete
Copy link

@Gsiete Gsiete commented Jan 19, 2024

Description

This should probably be configurable or something, but I made this fork because not
knowing where the issue was coming from was always a headache

Check List

If not relevant to pull request, check off as complete

  • All tests passing
  • Docs updated with any changes or examples if applicable
  • Added tests to ensure new feature(s) work properly

Relevant Issues

@@ -791,7 +792,7 @@ export function dispatchListenerResponse({
? docData.docChanges()
: docData.docChanges;
// Dispatch different actions for doc changes (only update doc(s) by key)
if (docChanges && docChanges.length < docData.size) {
if (docChanges && docChanges.length < Math.min(MAX_MULTI_ACTION, docData.size)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this max of 15 come from? We should note this in docs and make it an option if it isn't an amount enforced in firebase

@@ -247,7 +247,7 @@ export function setListener(firebase, dispatch, queryOpts, successCb, errorCb) {
!!console &&
typeof console.error === 'function' // eslint-disable-line no-console
) {
console.error('redux-firestore listener error:', err); // eslint-disable-line no-console
console.error(`redux-firestore listener error for collection "${meta?.collection}":`, err); // eslint-disable-line no-console
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@prescottprue prescottprue changed the title ADD: show collection in errors feat(logging): show collection in errors Mar 9, 2024
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