googleapis / googleapis/google-cloud-node
FR: Include document path in error messages
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.2k
- Forks
- 712
- Ø Merge
- 2 T. 9 Std.
- Gemergte PRs (30 T.)
- 104
Beschreibung
**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.
Beitragsleitfaden
Rechercherichtung
Das Issue nennt keine Datei und keinen Test. Beginne damit, die Validierung von Firestore-Dokumentschreibvorgängen und die für ungültige Dokumentdaten erzeugten Fehler nachzuverfolgen; abgeschlossen ist die Arbeit, wenn die relevanten Fehler den Dokumentpfad enthalten und dabei die vorhandenen Felddetails beibehalten werden und Tests die angeforderte Formulierung abdecken.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- nodejs, typescript
- Bereich
- databases
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100