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):
283
283
subscriber_exe_context .reset ()
284
284
return result
285
285
286
+ def catch_error (error ):
287
+ subscriber_exe_context .errors .append (error )
288
+ return Observable .just (None )
289
+
286
290
observables = [] # type: List[Observable]
287
291
292
+ # TODO: Make sure this works with multiple fields (currently untested)
288
293
# assert len(fields) == 1, "Can only subscribe one element at a time."
289
294
290
295
for response_name , field_asts in fields .items ():
@@ -297,11 +302,6 @@ def map_result(data):
297
302
)
298
303
if result is Undefined :
299
304
continue
300
-
301
- def catch_error (error ):
302
- subscriber_exe_context .errors .append (error )
303
- return Observable .just (None )
304
-
305
305
# Map observable results
306
306
observable = result .catch_exception (catch_error ).map (
307
307
lambda data : map_result ({response_name : data })
You can’t perform that action at this time.
0 commit comments