File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -283,8 +283,13 @@ def map_result(data):
283283 subscriber_exe_context .reset ()
284284 return result
285285
286+ def catch_error (error ):
287+ subscriber_exe_context .errors .append (error )
288+ return Observable .just (None )
289+
286290 observables = [] # type: List[Observable]
287291
292+ # TODO: Make sure this works with multiple fields (currently untested)
288293 # assert len(fields) == 1, "Can only subscribe one element at a time."
289294
290295 for response_name , field_asts in fields .items ():
@@ -297,11 +302,6 @@ def map_result(data):
297302 )
298303 if result is Undefined :
299304 continue
300-
301- def catch_error (error ):
302- subscriber_exe_context .errors .append (error )
303- return Observable .just (None )
304-
305305 # Map observable results
306306 observable = result .catch_exception (catch_error ).map (
307307 lambda data : map_result ({response_name : data })
You can’t perform that action at this time.
0 commit comments