mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-14 09:19:40 +00:00
workflow apis (#326)
Co-authored-by: Shuchang Zheng <wintonzheng0325@gmail.com>
This commit is contained in:
parent
50026f33c2
commit
72d25cd37d
9 changed files with 364 additions and 19 deletions
|
@ -107,8 +107,22 @@ class UnknownBlockType(SkyvernException):
|
|||
|
||||
|
||||
class WorkflowNotFound(SkyvernHTTPException):
|
||||
def __init__(self, workflow_id: str) -> None:
|
||||
super().__init__(f"Workflow {workflow_id} not found", status_code=status.HTTP_404_NOT_FOUND)
|
||||
def __init__(
|
||||
self,
|
||||
workflow_id: str | None = None,
|
||||
workflow_permanent_id: str | None = None,
|
||||
version: int | None = None,
|
||||
) -> None:
|
||||
workflow_repr = ""
|
||||
if workflow_id:
|
||||
workflow_repr = f"workflow_id={workflow_id}"
|
||||
if workflow_permanent_id:
|
||||
if version:
|
||||
workflow_repr = f"workflow_permanent_id={workflow_permanent_id}, version={version}"
|
||||
else:
|
||||
workflow_repr = f"workflow_permanent_id={workflow_permanent_id}"
|
||||
|
||||
super().__init__(f"Workflow not found. {workflow_repr}", status_code=status.HTTP_404_NOT_FOUND)
|
||||
|
||||
|
||||
class WorkflowRunNotFound(SkyvernException):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue