Skip to content

TaskDeletion struct has incorrect type for field deleted_tasks #665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
coinmoles opened this issue May 2, 2025 · 0 comments · May be fixed by #666
Open

TaskDeletion struct has incorrect type for field deleted_tasks #665

coinmoles opened this issue May 2, 2025 · 0 comments · May be fixed by #666

Comments

@coinmoles
Copy link

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.

@coinmoles coinmoles linked a pull request May 2, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant