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 finegrained exceptions to client #567

Merged
merged 10 commits into from
Apr 29, 2024

Conversation

ekorman
Copy link
Contributor

@ekorman ekorman commented Apr 26, 2024

Beyond adding finegrained exceptions to the client as outlined in #482 , this PR

  • Removes some backend exceptions that were never used
  • Changes behavior so that when calls like get_dataset or get_prediction are requested on things that don't exist, instead of returning None we raise an exception

@ekorman ekorman linked an issue Apr 26, 2024 that may be closed by this pull request
3 tasks
@@ -18,3 +23,77 @@ def __init__(self):
class ClientConnectionFailed(Exception):
def __init__(self, msg: str):
super().__init__(msg)


class ServiceUnavailable(ClientException):
Copy link
Collaborator

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."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya, will add

@ekorman ekorman merged commit 99d9929 into main Apr 29, 2024
11 checks passed
@ekorman ekorman deleted the 482-enh-finegrained-exceptions-in-the-client branch April 29, 2024 18:04
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.

ENH: finegrained exceptions in the client
2 participants