Skip to content

Commit

Permalink
DOCUMENTATION -- Correction in websockets.md (#1011)
Browse files Browse the repository at this point in the history
Correct the exception class from `starlette.websockets.Disconnect` to `starlette.websockets.WebSocketDisconnect`
  • Loading branch information
Yaakov-Belch committed Jul 27, 2020
1 parent aee9106 commit 1db8010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/websockets.md
Expand Up @@ -68,7 +68,7 @@ Use `websocket.send_json(data, mode="binary")` to send JSON over binary data fra
* `await websocket.receive_bytes()`
* `await websocket.receive_json()`

May raise `starlette.websockets.Disconnect()`.
May raise `starlette.websockets.WebSocketDisconnect()`.

JSON messages default to being received over text data frames, from version 0.10.0 onwards.
Use `websocket.receive_json(data, mode="binary")` to receive JSON over binary data frames.
Expand Down

0 comments on commit 1db8010

Please sign in to comment.