Skip to content

Commit

Permalink
fix archive 404 handling
Browse files Browse the repository at this point in the history
  • Loading branch information
noerw committed Oct 18, 2018
1 parent 33a9c42 commit abcfbf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/archive.R
Expand Up @@ -97,7 +97,7 @@ archive_fetch_measurements = function (box, sensor, fromDate, toDate, progress)
))

if (httr::status_code(res) == 404)
return(as.data.frame)
return(data.frame(createdAt = character(), value = character()))
}

measurements = httr::content(res, type = 'text', encoding = 'UTF-8') %>%
Expand Down

0 comments on commit abcfbf5

Please sign in to comment.