File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def wrapper(body, **kwargs):
5353
5454 # Load the plugin module
5555 plugin_import_error = True
56- plugin_import_error_exception = ""
56+ plugin_error_message = ""
5757 plugin_list = collect_plugins ()
5858 if plugin_name in plugin_list :
5959 try :
@@ -63,14 +63,13 @@ def wrapper(body, **kwargs):
6363 f"Successfully imported plugin module from { PLUGIN_PATH } .{ plugin_name } .plugin"
6464 )
6565 except ImportError as e :
66- plugin_import_error_exception = str (e )
66+ plugin_error_message = f"Could not import plugin <{ plugin_name } >!: { e } "
67+ else :
68+ plugin_error_message = f"Could not find plugin module <{ plugin_name } >! Current list of plugins available in '{ PLUGIN_PATH } ' namespace: { plugin_list } "
6769 if plugin_import_error :
68- logger .warning (
69- f"Could not import plugin <{ plugin_name } >! Current list of plugins available in '{ PLUGIN_PATH } ' namespace: { plugin_list } "
70- )
71- if plugin_import_error_exception :
72- logger .debug (str (plugin_import_error_exception ))
73- return str (plugin_import_error_exception ), 400
70+ logger .error (plugin_error_message )
71+ return plugin_error_message , 400
72+
7473 downstream_logger = plugin_module .logger
7574
7675 # Get the identifiers through a search query
You can’t perform that action at this time.
0 commit comments