Skip to content

Test for "OVER_QUERY_LIMIT" #5

@jcanistrum-uminho

Description

@jcanistrum-uminho

Hi,

I was using placement when I started to face an error message

 Error in vapply(json, function(x) { : values must be length 11,
 but FUN(X[[1]]) result is length 0 

after some debug I found the reason to be a JSON returning NULL as the Status was "OVER_QUERY_LIMIT" and as the status is only tested here

  #raise error if response is denied
  if (json[[1]]$status == 'REQUEST_DENIED') {
    stop(paste0(
      "Request sent to Google, but response returned REQUEST_DENIED.  Error details:\n", 
      json[[1]]$error_message
    ))
  }

So probably would be better to test to the both statuses or for the status not = OK.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions