Closed cthunes closed 1 month ago
The fix is not compatible for responses with length>1 (ie, using SPID, AEID, or DTXSID) in almost any case. We need to find a way to standardize the format of the table with different lengths.
For context, any response from the API with only one row is automatically put into a simple list, and we are converting it to a table. This is most common with a m4id request.
Any response from the API with multiple rows (usually SPID, AEID, and DTXSID) are automatically put into a table format by jsonlite, but the format for nested list columns are slightly different than our conversion we do for m4id. jsonlite puts these into a nested data.table form, while our conversion puts those columns in a nested list form.
The fix for this ticket works for nested list form but it will break for nested data.table form.
Error in !sapply(res[which(names(res) %in% param_cols)], is.na) :
invalid argument type
Reopening this ticket so we can do one of the following as a resolution:
Can replicate this with m4id = 739820
mc6Param
isNA
when the curve had no associated flags. Not sure if the better solution is to:mc#Param
fields are notNA
, ormc6Param
with default columns manually, withflag = NA
andmc6MthdId = NA
Thoughts on if ccdR should just prevent the error, and then tcpl can instead handle this? @brown-jason
I don't think this could affect the other
mc#Param
fields, since those should all always contain some parameters, so this is probably just anmc6Param
issue.