Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling on cr_journals with iSSN / Not found message from the api #97

Closed
nkorf opened this issue Jan 29, 2016 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@nkorf
Copy link

nkorf commented Jan 29, 2016

Hi,
First of all great thanks for this amazing package.
I am having a problem with the cr_journals function call with an issn argument. I suspect this has to do with the crossref api not returning any details for a particular issn. If you try to run
the function :
cr_journals("0413-6597")
will return an error message as follows:

Error in x$flags : $ operator is invalid for atomic vectors
In addition: Warning message:
404: Resource not found. 

I suspect it has to do with error handling for a 404 responce, is there a way to circumvent this issue ?

@sckott
Copy link
Contributor

sckott commented Jan 29, 2016

Thanks for the report ! That function and others loop internally so users can pass in many DOIs/ISSNs/etc. - on failure for any one we just throw a warning, but don't stop the function progress - this particular bug we didn't catch appropriately, looking at it now

@sckott sckott added the bug label Jan 29, 2016
@sckott sckott added this to the v0.6 milestone Jan 29, 2016
@sckott sckott self-assigned this Jan 29, 2016
sckott added a commit that referenced this issue Jan 29, 2016
various other small changes to fix other fxns including giving back NULL instead of NA on no result
tidying on cr_search, which may actually be defunct soon, that URL is down
better error message now, gives DOI/ISSN/etc of the ones that fail
bump dev version
@sckott
Copy link
Contributor

sckott commented Jan 29, 2016

@nkorf okay, try your eg again after reinstalling devtools::install_github("ropensci/rcrossref")

@nkorf
Copy link
Author

nkorf commented Jan 31, 2016

@sckott Ok it works now. I also used a temporary workaround for the older version to surround the function call with try(). Keep up the great work.

@sckott
Copy link
Contributor

sckott commented Jan 31, 2016

great, glad it works now.

Keep up the great work.

will do, and keep reporting problems

@sckott sckott closed this as completed Feb 9, 2016
@sckott sckott modified the milestones: v0.5.2, v0.6 Feb 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants