Skip to content

Index not found error when querying with undefined attribute value #1627

@paultranvan

Description

@paultranvan

This query will trigger a 400 error Index not used

const client = await client.query('io.cozy.todos').where({ name: undefined })`

This error comes from CouchDB that apparently does not like having an undefined value when querying an index. So we should make some check before running the query to warn the user about that, instead of this misleading error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions