-
Notifications
You must be signed in to change notification settings - Fork 5
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
Improve error message when trying to run a plan that does not exist from the CLI client #311
base: main
Are you sure you want to change the base?
Conversation
DiamondJoseph
commented
Sep 21, 2023
- Closes Unclear error message when plan does not exists #299
class BlueskyRemoteError(Exception): | ||
def __init__(self, message: str) -> None: | ||
super().__init__(message) | ||
response: Response | ||
|
||
def __init__(self, message: Response) -> None: | ||
self.response = message |
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.
This de-generliases the exception to be dependant on HTTP. Could make it optional, or make a new, specific exception.
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.
bluesky remote is only http rest at the moment, right?
we could generalize when we need to
if e.response.status_code == 404: | ||
print(f'Plan "{name}" not found') |
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.
Should the server-side API provide a human-readable message in this case?
|