redis-developer / redis-developer/redis-vl-typescript

Log a warning when removing a non-existent field

Open Beginner friendly
#13 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.