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

RemoteProtocolError event_hint parameter #178

Open
Kludex opened this issue Oct 29, 2022 · 4 comments
Open

RemoteProtocolError event_hint parameter #178

Kludex opened this issue Oct 29, 2022 · 4 comments

Comments

@Kludex
Copy link

Kludex commented Oct 29, 2022

Hi 👋

I was trying to add a test on uvicorn, when conn.receive_data() was able to send a RemoteProtocolError without an error hint:

https://github.com/encode/uvicorn/blob/22bd00eab6dfa7145618ce6cd1acfdffea8bbe6e/uvicorn/protocols/websockets/wsproto_impl.py#L89-L94

But the thing is... In the whole wsproto source code, there's always an event_hint being sent.

Can we make event_hint mandatory here?

def __init__(self, message: str, event_hint: Optional[Event] = None) -> None:

EDIT: See encode/uvicorn#1486.

@Kludex
Copy link
Author

Kludex commented Aug 27, 2023

👋

1 similar comment
@Kludex
Copy link
Author

Kludex commented Dec 17, 2023

👋

@njsmith
Copy link
Member

njsmith commented Dec 17, 2023 via email

@Kludex
Copy link
Author

Kludex commented Dec 17, 2023

Why?

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

No branches or pull requests

2 participants