python-hyper / wsproto

Sans-IO WebSocket protocol implementation
https://wsproto.readthedocs.io/
MIT License
261 stars 38 forks source link

`RemoteProtocolError` `event_hint` parameter #178

Open Kludex opened 1 year ago

Kludex commented 1 year ago

Hi :wave:

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?

https://github.com/python-hyper/wsproto/blob/a7d9ff0c34567b042d025db555595bb6234f89e8/src/wsproto/utilities.py#L50

EDIT: See https://github.com/encode/uvicorn/pull/1486.

Kludex commented 1 year ago

👋

Kludex commented 8 months ago

👋

njsmith commented 8 months ago

Seems fine to me.

On Sun, Dec 17, 2023, 00:59 Marcelo Trylesinski @.***> wrote:

👋

— Reply to this email directly, view it on GitHub https://github.com/python-hyper/wsproto/issues/178#issuecomment-1859078382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEU42DRJZCFBAAPQR5HTFTYJ2YARAVCNFSM6AAAAAARR526MKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGA3TQMZYGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Kludex commented 8 months ago

Why?