Skip to content

Commit 896ebb4

Browse files
Type error instead of runtime error
1 parent a3f68d6 commit 896ebb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/replit_river/codegen/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ async def {name}(
10061006
]
10071007
)
10081008
else:
1009-
raise ValueError("Precondition failed")
1009+
assert_never(protocol_version)
10101010
elif procedure.type == "stream":
10111011
assert output_meta
10121012
assert error_meta
@@ -1102,7 +1102,7 @@ async def {name}(
11021102
]
11031103
)
11041104
else:
1105-
raise ValueError("Precondition failed")
1105+
assert_never(protocol_version)
11061106

11071107
current_chunks.append("")
11081108
return current_chunks

0 commit comments

Comments
 (0)