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

Fix typos #270

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Fix typos #270

merged 1 commit into from
Sep 8, 2023

Conversation

zxzxwu
Copy link
Collaborator

@zxzxwu zxzxwu commented Sep 7, 2023

No description provided.

@zxzxwu
Copy link
Collaborator Author

zxzxwu commented Sep 7, 2023

Shall we also add Frontend checking in presubmits?

@zxzxwu
Copy link
Collaborator Author

zxzxwu commented Sep 7, 2023

Fixing #266

bumble/hfp.py Outdated
@@ -390,7 +391,7 @@ async def execute_command(
)
if result.code == 'OK':
if response_type == AtResponseType.SINGLE and len(responses) != 1:
raise ProtocolError("NO ANSWER")
raise InvalidStateError("NO ANSWER")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think ProtocolError is more appropriate here. An InvalidStateError is usually more representative of a condition like trying to close a stream that's not open. a ProtocolError reflects an error in an exchange between two entities, where the syntax or sequence of messages isn't what's expected or allowed, which seems to be the case here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I extend BaseError to show non-digital errors.

@zxzxwu zxzxwu merged commit 25f300d into google:main Sep 8, 2023
16 checks passed
@zxzxwu zxzxwu deleted the typo branch September 8, 2023 09:32
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