meilisearch-rust
meilisearch-rust copied to clipboard
TaskDeletion struct has incorrect type for field deleted_tasks
Description
When trying to call perform get_task() for a deletion task, I get an error:
Error parsing response JSON: invalid type: null, expected usize.
After getting the response object by calling the api manually and comparing it to the structs, I found out that deletedTasks was null in my response object, while the deleted_tasks field in struct TaskDeletion is usize and not Option<usize>
https://github.com/meilisearch/meilisearch-rust/blob/90a153c88112cddefc1936d3bef4763907211c2b/src/tasks.rs#L115-L121
According to the API documentation, the deleted_tasks can be null when the task is enqueued or processing.