googleapis / googleapis/google-cloud-node
FR: Include document path in error messages
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
**Is your feature request related to a problem? Please describe.**
When getting an error like
```
Error: Value for argument "data" is not a valid Firestore document. Cannot use "undefined" as a Firestore value (found in field "xyz"). If you want to ignore undefined values, enable `ignoreUndefinedProperties`.
```
often it's hard to understand in which document the error would appear, especially when writing lots of documents in one execution.
**Describe the solution you'd like**
Include the document path in all errors, e.g.:
```
Error: Value for argument "data" of document "foo/bar/baz/bat" is not a valid Firestore document. Cannot use "undefined" as a Firestore value (found in field "xyz"). If you want to ignore undefined values, enable `ignoreUndefinedProperties`.
```
**Describe alternatives you've considered**
Manually log all the document paths before executing a Firestore query, which can also spam the logs.
Contributor guide
Assessment
This issue has not been assessed yet.