starlette icon indicating copy to clipboard operation
starlette copied to clipboard

Add WebSocketException and support for WS handlers

Open Kludex opened this issue 3 years ago • 8 comments

  • Replaces #527

Missing

  • [ ] Address what @tomchristie said on https://github.com/encode/starlette/pull/527#discussion_r343613065: image

  • [ ] Check how this PR works interacting with the server.

Kludex avatar Aug 11 '21 19:08 Kludex

@Kludex just fyi I updated this branch and fixed all issues

adriangb avatar Jan 27 '22 17:01 adriangb

don't worry :)

Kludex avatar Jan 27 '22 17:01 Kludex

Any updates?

nameer avatar Feb 28 '22 11:02 nameer

Any updates or help needed on this?

brunopcarv avatar Mar 08 '22 20:03 brunopcarv

Any updates on this ?

obonyojimmy avatar Apr 14 '22 03:04 obonyojimmy

No.

Kludex avatar Apr 14 '22 06:04 Kludex

Update here: I'll be working on this on the following weeks. If my memory doesn't fail me, this PR should be completed, but I need to implement something (which I don't know what, I need to check) on uvicorn.

Kludex avatar Apr 21 '22 06:04 Kludex

I've rebased the PR, add the reason field on the WebSocketException, and updated the PR description.

Kludex avatar May 10 '22 05:05 Kludex

Any update on this one?

nameer avatar Aug 12 '22 12:08 nameer

No.

Kludex avatar Aug 12 '22 12:08 Kludex

I'm going to work on this.

Kludex avatar Aug 12 '22 18:08 Kludex

This PR is completed.

@tomchristie Would you mind checking it?

Considering the comment you made (described in the description), I've removed the logic from the ServerErrorMiddleware. Instead, I've created a follow-up on https://github.com/Kludex/starlette/pull/22, do you think that makes sense?

Kludex avatar Aug 13 '22 14:08 Kludex

Thanks @tomchristie @tiangolo 🎉

Kludex avatar Sep 05 '22 12:09 Kludex