Skip to content

Commit e103e87

Browse files
authored
Fix exception causes in server.py
1 parent 69c94af commit e103e87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/websockets/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ def process_origin(
340340
# per https://tools.ietf.org/html/rfc6454#section-7.3.
341341
try:
342342
origin = cast(Origin, headers.get("Origin"))
343-
except MultipleValuesError:
344-
raise InvalidHeader("Origin", "more than one Origin header found")
343+
except MultipleValuesError as e:
344+
raise InvalidHeader("Origin", "more than one Origin header found") from e
345345
if origins is not None:
346346
if origin not in origins:
347347
raise InvalidOrigin(origin)

0 commit comments

Comments
 (0)