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

Handle connection errors in cache? #17

Open
bganglia opened this issue Apr 15, 2020 · 8 comments
Open

Handle connection errors in cache? #17

bganglia opened this issue Apr 15, 2020 · 8 comments

Comments

@bganglia
Copy link
Collaborator

bganglia commented Apr 15, 2020

Failed requests should not be saved.

A report should be generated with the DOIs that have led to failed requests.

This was raised as part of the discussion in issue #12

@bganglia
Copy link
Collaborator Author

@naustica Could you talk a little bit more about what you mean by a report?

@bganglia bganglia mentioned this issue Apr 15, 2020
7 tasks
@naustica
Copy link
Member

something like:
Report

Out of seven dois, two were invalid.

doi error
10.3253/dga.dsfs Unpaywall response
10.214134/afsaf Timeout...

Or do you have a better idea?

@naustica
Copy link
Member

ok, the table has just been converted to markdown. Imagine that as a plain python table

@bganglia
Copy link
Collaborator Author

Ok. Right now dois are requested one-by-one, so I guess it would make sense to add a function that takes in a list of dois and then prints this report to the console, if the console is the best place.

@bganglia
Copy link
Collaborator Author

@naustica What do you think about just a warning?

@naustica
Copy link
Member

@bganglia I dont know. I associate warnings with internal problems. But this is more of an external one. Or? But we can do that.

@bganglia
Copy link
Collaborator Author

@naustica Now that I think about it, a report would probably be easier to read anyway. Printing out a report sounds good to me.

@naustica
Copy link
Member

naustica commented Apr 21, 2020

@bganglia Python provides also the tempfile module (https://docs.python.org/3.7/library/tempfile.html) which creates a temporary file that we could use to store dois from faulty connections. So we can create a temporary txt file that the user has access to. The tempfile would only exist for one session (I think) which is also nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants