Skip to content

TaskDeletion struct has incorrect type for field deleted_tasks #665

Open
@coinmoles

Description

@coinmoles

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>

#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TaskDeletion {
pub matched_tasks: usize,
pub deleted_tasks: usize,
pub original_filter: String,
}

According to the API documentation, the deleted_tasks can be null when the task is enqueued or processing.

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