You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.
This is related to the initial issue raised here: #1
I don't think we should just throw naked exceptions from the Requests library on errors; that means that if client programs are using the Xively library, they also have to import exceptions from Requests if they want to handle errors in any sort of fine grained detail. I don't think clients should have to care what HTTP library we are using under the hood, so I think we should raise our own errors on failures.
In fact I have some example code that does that that I'll try to clean up and attach to this issue.
I'm working on wrapping some exceptions that it makes sense to (namely 404s), and I take your point but I'm not sure I entirely agree. We shouldn't hide the fact that we are using the requests library under the hood, and in fact if you need to access CSV, XML, or PNGs directly this is done with the low level client which returns a requests.Response object.
How about instead we export the request exceptions from the xively namespace:
This is related to the initial issue raised here: #1
I don't think we should just throw naked exceptions from the Requests library on errors; that means that if client programs are using the Xively library, they also have to import exceptions from Requests if they want to handle errors in any sort of fine grained detail. I don't think clients should have to care what HTTP library we are using under the hood, so I think we should raise our own errors on failures.
In fact I have some example code that does that that I'll try to clean up and attach to this issue.
@gnublade
The text was updated successfully, but these errors were encountered: