Skip to content

Commit

Permalink
added the error for POST api results
Browse files Browse the repository at this point in the history
  • Loading branch information
sameerpadhye committed Oct 1, 2024
1 parent df31cd3 commit bf35e4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/helper.POSTapi_download_w_json2df.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ post.api.res.fetch<-function (base.url,
)
)

# if (httr::status_code(result) < 200 || httr::status_code(result)>=300)
# {
# stop(paste("Data could not be retrieved. Please check the get_by & identifiers. Please also re-confirm whether the API key has the necessary permissions to obtain the requested data."))
# }
if (httr::status_code(result) < 200 || httr::status_code(result)>=300)
{
stop(paste("Data could not be retrieved. Please check the get_by & identifiers. Please also re-confirm whether the API key has the necessary permissions to obtain the requested data."))
}

return(result)

Expand Down

0 comments on commit bf35e4d

Please sign in to comment.