Skip to content

TaskHandler's delete_task has paramaters as optional but it should be required #820

@sanders41

Description

@sanders41

Description
Description of what the bug is about.

The signature of delete_tasks in TaskHandler is def delete_tasks(self, parameters: Dict[str, Any]) -> TaskInfo:. However if you don't provide any parameters you get an error from Meilisearch so this should really be required.

Expected behavior
What you expected to happen.

No error

Current behavior
What happened.

Meilisearch returns an error if no parameters are provided.

meilisearch.errors.MeilisearchApiError: MeilisearchApiError. Error code: missing_task_filters. Error message: Query parameters to filter the tasks to delete are missing. Available query parameters are: uids, indexUids, statuses, types, canceledBy, beforeEnqueuedAt, afterEnqueuedAt, beforeStartedAt, afterStartedAt, beforeFinishedAt, afterFinishedAt. Error documentation: https://docs.meilisearch.com/errors#missing_task_filters Error type: invalid_request

Screenshots or Logs
If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. Debian GNU/Linux]
  • Meilisearch version: [e.g. v.0.20.0]
  • meilisearch-python version: [e.g v0.14.1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions