Show strategy plugin load errors in notifications#102
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e8199d718
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| detail = _compact_strategy_plugin_error(error) | ||
| if not detail: | ||
| return "" | ||
| error_type = detail.split(":", 1)[0].rsplit(".", 1)[-1].strip() | ||
| reason_key = f"strategy_plugin_error_reason_{error_type}" if error_type else "" |
There was a problem hiding this comment.
Use exception classes for load-error mapping
When callers pass the caught exception object from load_strategy_plugin_signal or parse_strategy_plugin_mounts (for example except ValueError as exc), str(exc) contains only the message, so these lines derive error_type from words in the message rather than from ValueError, JSONDecodeError, FileNotFoundError, etc. In that common exception-object path none of the new localized strategy_plugin_error_reason_* keys match, so Chinese notifications can still include raw English error details instead of the intended operator-facing summary; use type(error).__name__ for BaseException values before falling back to preformatted strings.
Useful? React with 👍 / 👎.
Summary
Tests