Skip to content

feat(schema): log warnings for removeField missing field and invalid HASH path#26

Open
linbo328 wants to merge 1 commit into
redis-developer:mainfrom
linbo328:fix/warn-on-missing-field
Open

feat(schema): log warnings for removeField missing field and invalid HASH path#26
linbo328 wants to merge 1 commit into
redis-developer:mainfrom
linbo328:fix/warn-on-missing-field

Conversation

@linbo328
Copy link
Copy Markdown

Summary

Implemented two warnings requested in the issue:

  1. removeField: Logs a warning when the field is not found, including the field name and list of known fields.
  2. addField: Logs a warning when a path is provided for HASH storage type.

Changes

  • src/schema/schema.ts: Replaced // TODO: log a warning comments with actual console.warn calls.

This helps users diagnose typos in field names when calling removeField.

Closes #13

…id path for HASH storage

- Log warning with field name and known fields list when removeField is called with non-existent field
- Log warning when path is provided for HASH storage type

This helps diagnose typos in field names.

Closes redis-developer#13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log a warning when removing a non-existent field

1 participant