Skip to content

Commit

Permalink
raise 400 error
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng committed Oct 24, 2024
1 parent 1a1ba58 commit fc5e561
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion skyvern/forge/sdk/routes/agent_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@
)
from skyvern.forge.sdk.services import org_auth_service
from skyvern.forge.sdk.settings_manager import SettingsManager
from skyvern.forge.sdk.workflow.exceptions import FailedToCreateWorkflow, FailedToUpdateWorkflow
from skyvern.forge.sdk.workflow.exceptions import (
FailedToCreateWorkflow,
FailedToUpdateWorkflow,
WorkflowParameterMissingRequiredValue,
)
from skyvern.forge.sdk.workflow.models.workflow import (
RunWorkflowResponse,
Workflow,
Expand Down Expand Up @@ -707,6 +711,8 @@ async def create_workflow(
return await app.WORKFLOW_SERVICE.create_workflow_from_request(
organization=current_org, request=workflow_create_request
)
except WorkflowParameterMissingRequiredValue as e:
raise e
except Exception as e:
LOG.error("Failed to create workflow", exc_info=True, organization_id=current_org.organization_id)
raise FailedToCreateWorkflow(str(e))
Expand Down

0 comments on commit fc5e561

Please sign in to comment.