-
Story
-
Resolution: Unresolved
-
Minor
-
None
-
rhel-8.10
Public and shared libraries should not control actor execution flow by raising StopActorExecutionError. Instead, they should raise specific exceptions and let the consuming actors decide how to handle failures. This improves separation of concerns, testability, and allows actors to handle the same error differently based on their specific context.
Solution:
1. Define custom exception classes (e.g., InvalidRepoDefinitionError) in the libraries or a shared exceptions module
2. Have library functions raise these custom exceptions instead of StopActorExecutionError
3. Update consuming actors to catch these exceptions and raise StopActorExecutionError with appropriate context
4. Update unit tests
5. Update the best practices for actor development (https://leapp.readthedocs.io/en/stable/best-practices.html#use-convenience-exceptions-to-stop-the-actor-s-execution) to not suggest to use this exception in shared libs.