devosend commented on a change in pull request #7631:
URL: https://github.com/apache/dolphinscheduler/pull/7631#discussion_r778765298



##########
File path: 
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/database.py
##########
@@ -52,5 +55,10 @@ def get_database_info(self, name) -> Dict:
             return self._database
         else:
             gateway = launch_gateway()
-            self._database = gateway.entry_point.getDatasourceInfo(name)
+            try:
+                self._database = gateway.entry_point.getDatasourceInfo(name)
+            # Handler database source do not exists error, for now we just 
terminate the process.
+            except Py4JJavaError:

Review comment:
       Except error is not just a situation. Should we use 
`Py4JJavaError.java_exception` to display clear information?




-- 
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