Skip to content

AsyncWebsocketConsumer: KeyError "code". #1926

Open
@VladosikPaltosik

Description

@VladosikPaltosik

channels/generic/websocket.py in websocket_disconnect at line 238

                await self.channel_layer.group_discard(group, self.channel_name)
        except AttributeError:
            raise InvalidChannelLayerError(
                "BACKEND is unconfigured or doesn't support groups"
            )
        await self.disconnect(message["code"])
        raise StopConsumer()

Got KeyError "code". How to solve a problem???

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