Skip to content

poll_task is trowing a 404 error because of changes in api reference #338

@francoisluc

Description

@francoisluc

I used the documented example in posit documentation and got a 404 error.
Image

library(connectapi)

CONTENT_GUID <- "34e425fb-179c-48e8-81bd-b334eb449f55"

client <- connect()
content <- content_item(client, CONTENT_GUID)
render_task <- content_render(content)

poll_task(render_task)

If you change this line
https://github.com/rstudio/connectapi/blame/f6093432582e1bed9ebcadbf613944cd691e5ead/R/deploy.R#L583

to

  task_data <- con$task(task$task$id, wait = wait, first = first)

It solves the problem. I saw some changes to the tasks endpoint in august and I think this code was not updated as id parameter is now mandatory.

Thanks in advance for fixing this small bug !

Metadata

Metadata

Assignees

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