cloudfour / cloudfour/drizzle-builder
Missing data errors with no context
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
The data helper is [missing an undefined check](https://github.com/cloudfour/drizzle-builder/blob/b39d815a5090fae13e2e8a17f47b3642f66f63a2/src/helpers/data.js#L19). If I call `data("some.invalid.key.path")`, then I get `TypeError: Cannot read property 'contents' of undefined`. From the stacktrace, I see it's a problem with data, but have no idea about what input is causing the problem.
More useful might be to throw an error that indicates that the data is missing at the given path. If that strictness isn't needed/intended, I could imagine instead logging a warning and continuing, but I don't see any patterns like that used elsewhere in the builder.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.