redis-developer / redis-developer/redis-vl-typescript
Log a warning when removing a non-existent field
Open
Beginner friendly
Nobody has claimed this yet.
enhancement
good first issue
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 3
- Avg merge
- 34m
- Merged PRs (30d)
- 3
Description
IndexSchema.removeField silently no-ops when the field doesn't exist:
// src/schema/schema.ts:278
removeField(fieldName: string): void {
if (!Object.hasOwn(this.fields, fieldName)) {
// TODO: log a warning
return;
}
delete this.fields[fieldName];
}
Useful for diagnosing typos when callers expect a field to be present.
Acceptance criteria
- Warn when the field isn't present in the schema.
- Include the field name and the list of known field names in the warning.
- Unit test.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read src/schema/schema.ts around IndexSchema.removeField at line 278, then find the existing unit tests for IndexSchema. Run those tests first and add coverage for removing a missing field; the work is done when the warning includes the requested field name and the known field names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100