Skip to content

Commit 916db99

Browse files
Codegen should provide useful errors
1 parent 6c928f1 commit 916db99

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/replit_river/codegen/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,11 +827,11 @@ def render_library_call(
827827
if procedure.type == "rpc":
828828
match protocol_version:
829829
case "v1.1":
830-
assert input_meta
830+
assert input_meta, "rpc expects input to be required"
831831
_, tpe, render_method = input_meta
832832
binding = "input"
833833
case "v2.0":
834-
assert init_meta
834+
assert init_meta, "rpc expects init to be required"
835835
_, tpe, render_method = init_meta
836836
binding = "init"
837837
case other:
@@ -868,11 +868,11 @@ async def {name}(
868868
elif procedure.type == "subscription":
869869
match protocol_version:
870870
case "v1.1":
871-
assert input_meta
871+
assert input_meta, "rpc expects input to be required"
872872
_, tpe, render_method = input_meta
873873
binding = "input"
874874
case "v2.0":
875-
assert init_meta
875+
assert init_meta, "rpc expects init to be required"
876876
_, tpe, render_method = init_meta
877877
binding = "init"
878878
case other:

0 commit comments

Comments
 (0)