Introduce ActionFunction to make it easy to patch and do extra validations before step starts (#365)

Co-authored-by: Shuchang Zheng <wintonzheng0325@gmail.com>
This commit is contained in:
Kerem Yilmaz
2024-05-25 18:24:35 -07:00
committed by GitHub
parent d3d38e2647
commit 2b4829f87a
4 changed files with 76 additions and 36 deletions

View File

@@ -262,3 +262,8 @@ class BitwardenLogoutError(BitwardenBaseError):
class UnknownElementTreeFormat(SkyvernException):
def __init__(self, fmt: str) -> None:
super().__init__(f"Unknown element tree format {fmt}")
class StepTerminationError(SkyvernException):
def __init__(self, step_id: str, reason: str) -> None:
super().__init__(f"Step {step_id} cannot be executed and task is terminated. Reason: {reason}")