IndexSchema.makeField currently has a silent TODO:
// src/schema/schema.ts:206
} else {
// For HASH storage, path should always be null
if (path !== null && path !== undefined) {
// TODO: log a warning
}
field.path = null;
}
Users who set a JSON path on a HASH-storage field get their value silently dropped. A warning would surface the misconfiguration.
Acceptance criteria
- Warn (via
console.warn or a logger if one is introduced) when a non-empty path is supplied for a HASH-storage field.
- Include the field name and the storage type in the warning.
- Unit test covering the warning surface.
IndexSchema.makeFieldcurrently has a silentTODO:Users who set a JSON path on a HASH-storage field get their value silently dropped. A warning would surface the misconfiguration.
Acceptance criteria
console.warnor a logger if one is introduced) when a non-emptypathis supplied for a HASH-storage field.