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

Function error

example/tutorial/step3/app.py:20–29  ·  view source on GitHub ↗

Send an error message.

(websocket, message)

Source from the content-addressed store, hash-verified

18
19
20async def error(websocket, message):
21 """
22 Send an error message.
23
24 """
25 event = {
26 "type": "error",
27 "message": message,
28 }
29 await websocket.send(json.dumps(event))
30
31
32async 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…