Skip to content

issue: storage/cosmosdb: Delete panics when the filter has no string id #254

Description

@Lutherwaves

DeleteContext reads filter["id"] unchecked (L423), then asserts id.(string) (L437, L445). A filter without a string id, like {"deleted_at": nil} or {"id": 42}, panics.

Fix: use comma-ok for the lookup and the assertion, and return an error. UpdateContext in the same file already does this.

Found while reviewing #251 / #247.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:storageStorage adapters (SQL/Dynamo/Cosmos/Memory)bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions