R/api.R
apiCheckStatus.Rd
Extract the http status code and convert it into a human readable message. Give warning if has an error.
apiCheckStatus(x)
A response() object or a number.
response()
FALSE if has an error, otherwise TRUE.
FALSE
TRUE
flightscanner:::apiCheckStatus(200L)#> [1] TRUEflightscanner:::apiCheckStatus(404L)#> Warning: Client error: (404) Not Found#> [1] FALSE