fkoh111 / zzlite

Lite wrapper for the Zamzar API :package:
0 stars 0 forks source link

task/zz_get_info_if_no_files_at_Zamzar #44

Closed fkoh111 closed 4 years ago

fkoh111 commented 4 years ago

If there's no files at Zamzar, the .zz_parse_response function will return the following json:

"{\"paging\":{\"total_count\":0,\"limit\":50},\"data\":[]}"

We need to test for this an throw an appropriate error. Right now it looks like your usr param is wrong because we're returning: Whoops, we can't find any valid key!

fkoh111 commented 4 years ago
# Return decent response if no files are stored with Zamzar
  if (content$paging$total_count == 0 && content$paging$limit == 50) {
    stop("Seems like Zamzar doesn't store any files submitted by this key!")
  }