wsproto icon indicating copy to clipboard operation
wsproto copied to clipboard

`RemoteProtocolError` `event_hint` parameter

Open Kludex opened this issue 3 years ago • 4 comments

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 avatar Oct 29 '22 19:10 Kludex

👋

Kludex avatar Aug 27 '23 19:08 Kludex

👋

Kludex avatar Dec 17 '23 08:12 Kludex

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: @.***>

njsmith avatar Dec 17 '23 19:12 njsmith

Why?

Kludex avatar Dec 17 '23 19:12 Kludex

@Kludex happy to review a PR and consider it for the next minor API-breaking release!

Kriechi avatar Nov 11 '25 22:11 Kriechi