2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-04 22:38:49 +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:
self._init_plugin(plg, plugin_configs)
break
except IntegrationPluginError:
# Error has been handled downstream
pass
except Exception as error:
# Handle the error, log it and try again
handle_error(
error, log_name='init', do_raise=settings.PLUGIN_TESTING
)
if attempts == 0:
handle_error(
error, log_name='init', do_raise=settings.PLUGIN_TESTING
)
logger.exception(
'[PLUGIN] Encountered an error with %s:\n%s',
error.path,