alexeyinkin commented on code in PR #24338:
URL: https://github.com/apache/beam/pull/24338#discussion_r1031623351


##########
playground/frontend/lib/modules/messages/handlers/set_content_message_handler.dart:
##########
@@ -34,11 +37,21 @@ class SetContentMessageHandler extends 
AbstractMessageHandler {
       return MessageHandleResult.notHandled;
     }
 
-    _handle(message);
+    unawaited(_handle(message));
     return MessageHandleResult.handled;
   }
 
-  void _handle(SetContentMessage message) {
-    playgroundController.examplesLoader.load(message.descriptor);
+  Future<void> _handle(SetContentMessage message) async {
+    final descriptor = message.descriptor;
+
+    try {
+      await playgroundController.examplesLoader.load(descriptor);

Review Comment:
   Yes, but I cannot think of a good reusable class or method with this. Let's 
wait until we have more locations. 4 lines x 2 locations is not much of a 
duplication.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to