2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-05 06:48:48 +00:00

More error logging during plugin loads (#8408)

- Ensure all errors are logged
This commit is contained in:
Oliver 2024-11-02 21:09:49 +11:00 committed by GitHub
parent cc6a2f4548
commit 6cca66cafa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -572,16 +572,13 @@ class PluginsRegistry:
try: try:
self._init_plugin(plg, plugin_configs) self._init_plugin(plg, plugin_configs)
break break
except IntegrationPluginError:
# Error has been handled downstream
pass
except Exception as error: except Exception as error:
# Handle the error, log it and try again # Handle the error, log it and try again
if attempts == 0:
handle_error( handle_error(
error, log_name='init', do_raise=settings.PLUGIN_TESTING error, log_name='init', do_raise=settings.PLUGIN_TESTING
) )
if attempts == 0:
logger.exception( logger.exception(
'[PLUGIN] Encountered an error with %s:\n%s', '[PLUGIN] Encountered an error with %s:\n%s',
error.path, error.path,