Skip to content

Improve logging on web socket connection closed #1263

Description

@nirben82

Describe the bug
When using web sockets and a connection is closed, an error is logged which can be confusing -

logging.error("WebSocket error: %s", e)

Expected behavior
When simple-socket closes the connection, it raises a ConnectionClosed exception, which does not indicate an error. I think it would be useful to catch this specific exception and log at info level that the connection was closed and the reason code.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions