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

add raise for sparql exceptions #39

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

domenicrosati
Copy link

Feel free to take or leave this, I implemented it on my fork due to rate limiting issues when using the SPARQL service alot.
Happy to follow up with any feedback to make it more idiomatic w.r.t your code base for error handling (or feel free to change it yourself!).

).json()
)
if resp.status_code != 200:
raise SPARQLResponseNotOk(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd probably prefer the caller to use a try/except or maybe something like this here (https://docs.python-requests.org/en/latest/user/quickstart/#response-status-codes) ... what do you thing?

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

Successfully merging this pull request may close these issues.

2 participants