-
Notifications
You must be signed in to change notification settings - Fork 2
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 finegrained exceptions to client #567
Conversation
@@ -18,3 +23,77 @@ def __init__(self): | |||
class ClientConnectionFailed(Exception): | |||
def __init__(self, msg: str): | |||
super().__init__(msg) | |||
|
|||
|
|||
class ServiceUnavailable(ClientException): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to copy the docstrings from the /api
exception classes to these classes for clarity? The docstring for this one would be "Raises an exception if the Valor service is unavailable."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, will add
Beyond adding finegrained exceptions to the client as outlined in #482 , this PR
get_dataset
orget_prediction
are requested on things that don't exist, instead of returningNone
we raise an exception