bls_api() suddenly returning error message
KevinCPhelps opened this issue · 2 comments
Hello,
I recently discovered that every time I run the bls_api() function, I now receive the following error message:
Error in if (jsondat$status == "REQUEST_SUCCEEDED") { :
argument is of length zero
This has never happened before. I updated my rlang package to the latest version but am still receiving the error, no matter which series IDs I request.
Thanks for your help,
Kevin
Hey @KevinCPhelps thanks for the report. I couldn't reproduce the result, could you send me the exact call you're using? That error message is generated by the BLS back-end API, so we'll have to do a bit of checking.
I ran the following and it worked as expected.
df <- bls_api("CUSR0000SA0")
.
Also note: The daily query limit is 25 requests unless you're using an API key. Is it possible you've hit the limit?
Thanks for the quick response! Here’s the call I’m using:
usdata<-bls_api(c("CEU0500000001", "LNU04000000"), startyear=2014, endyear=2023, registrationKey = bls_key)
I don’t think it’s possible that I’ve hit the daily limit and I get the same result regardless of whether I include my API key or not. I’ve also tried other series IDs but to no avail.
Thanks again,
Kevin