Skip to content

Commit

Permalink
More error logging during plugin loads (#8408)
Browse files Browse the repository at this point in the history
- Ensure all errors are logged
  • Loading branch information
SchrodingersGat authored Nov 2, 2024
1 parent cc6a2f4 commit 6cca66c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/backend/InvenTree/plugin/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,16 +572,13 @@ def _init_plugins(self):
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,
Expand Down

0 comments on commit 6cca66c

Please sign in to comment.