Skip to content

RemoteProtocolError event_hint parameter #178

Description

@Kludex

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 Kludex/uvicorn#1486.

Activity

  1. Kludex commented on Aug 27, 2023

    @Kludex
    Author

    👋

  2. Kludex commented on Dec 17, 2023

    @Kludex
    Author

    👋

  3. njsmith commented on Dec 17, 2023

    @njsmith
    Member
  4. Kludex commented on Dec 17, 2023

    @Kludex
    Author

    Why?

  5. Kriechi commented on Nov 11, 2025

    @Kriechi
    Member

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

  6. Kludex commented on May 24, 2026

    @Kludex
    Author

    Closed in #202.

    Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions