Skip to content

Conversation

thebrianchen
Copy link

Fixes #2606

One downside to this approach is if the underlying DocumentReference.set() fails, the function name in the error message will not say CollectionReference.add() (see applyFirestoreDataConverter). I thought about how to refactor set() to allow the function name to be passed down, but ultimately decided that this approach is cleaner + the developer can see the stack trace and deduce that for themselves.

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

@wilhuff wilhuff assigned thebrianchen and unassigned wilhuff Feb 10, 2020
@thebrianchen thebrianchen merged commit eb614f0 into master Feb 10, 2020
@thebrianchen thebrianchen deleted the bc/add branch February 10, 2020 22:42
@firebase firebase locked and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error "CollectionReference.add() requires its first argument to be of type object" when used with withConverter

2 participants