MCPcopy Index your code
hub / github.com/python-websockets/websockets / error

Function error

example/tutorial/step2/app.py:17–26  ·  view source on GitHub ↗

Send an error message.

(websocket, message)

Source from the content-addressed store, hash-verified

15
16
17async def error(websocket, message):
18 """
19 Send an error message.
20
21 """
22 event = {
23 "type": "error",
24 "message": message,
25 }
26 await websocket.send(json.dumps(event))
27
28
29async def replay(websocket, game):

Callers 3

playFunction · 0.70
joinFunction · 0.70
watchFunction · 0.70

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…