Closed yanokwa closed 3 years ago
Tks @yanokwa
@florianm
Solution is simple, I believe, just add:
qry<-qry[qry!=""]
@mtyszler thanks for the idea - definitely a good catch-all. In my moderately sleep-deprived state I went and dropped skip and top explicitly. Unit tests are passing against my quick test project on the ODK Central Sandbox (v1.2) and my own test Central (v1.1). I'm pushing ruODK version 0.10.2 with the patch now and see how GitHub Actions feels about them.
Problem
odata_submission_get()
times out while collecting to Central v1.2.Reproducible example
Likely solution
In my testing with a simple Python script, I noticed that dropping the
$skip
and$top
parameters would result in a 200, but adding them as ruODK does would result in a 502.The OData documentation at https://www.odata.org/documentation/odata-version-2-0/uri-conventions says that for
$skip
and$top
, "N is an integer greater than or equal to zero specified by this query option. If a value less than zero is specified, the URI should be considered malformed."I don't know if this is new behavior in Central, but regardless, I think ruODK should do what the OData spec says.
https://github.com/ropensci/ruODK/blob/main/R/odata_submission_get.R#L184 is the relevant line of code for this issue and a code search shows it's the only place that has
$skip
and$top
.