diff --git a/src/replit_river/codegen/client.py b/src/replit_river/codegen/client.py index 7126163d..36ddbc76 100644 --- a/src/replit_river/codegen/client.py +++ b/src/replit_river/codegen/client.py @@ -1013,6 +1013,12 @@ async def {name}( ] ) elif procedure.type == "subscription": + output_or_error_type = UnionTypeExpr( + [ + output_or_error_type, + TypeName("RiverError"), + ] + ) current_chunks.extend( [ reindent( @@ -1086,6 +1092,12 @@ async def {name}( ] ) elif procedure.type == "stream": + output_or_error_type = UnionTypeExpr( + [ + output_or_error_type, + TypeName("RiverError"), + ] + ) if init_type: assert render_init_method, "Expected an init renderer!" current_chunks.extend(