Skip to content

Improve logging on web socket connection closed #1263

@nirben82

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.

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