You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/08/31 12:34:32 UTC

[GitHub] [incubator-devlake] e2corporation commented on a diff in pull request #2887: fix: connection saving must return after 2 seconds even though the ne…

e2corporation commented on code in PR #2887:
URL: https://github.com/apache/incubator-devlake/pull/2887#discussion_r959339865


##########
config-ui/src/hooks/useConnectionManager.jsx:
##########
@@ -282,7 +285,11 @@ function useConnectionManager (
         if (!updateMode) {
           history.push(`/integrations/${provider.id}`)
         }
-      } else {
+      }
+    })
+
+    setTimeout(() => {

Review Comment:
   If you're going to assign returned save & update promises at this point in the code-flow then why bother keeping the existing timeout? It would make more sense to chain a catch call and add then toast a notification on the failure so the timeout wrap can be removed.



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org