raise value cannot be null when workflow run parameter is null (#4270)

This commit is contained in:
Shuchang Zheng
2025-12-10 21:46:35 -08:00
committed by GitHub
parent a5d6925079
commit 13425b1c3d

View File

@@ -12,7 +12,6 @@ from typing import Any, Literal, cast
import httpx import httpx
import structlog import structlog
from asyncpg.exceptions import NotNullViolationError
from sqlalchemy.exc import IntegrityError, SQLAlchemyError from sqlalchemy.exc import IntegrityError, SQLAlchemyError
import skyvern import skyvern
@@ -525,9 +524,7 @@ class WorkflowService:
@staticmethod @staticmethod
def _format_parameter_persistence_error(error: SQLAlchemyError) -> str: def _format_parameter_persistence_error(error: SQLAlchemyError) -> str:
if isinstance(error, IntegrityError): if isinstance(error, IntegrityError):
orig_error = getattr(error, "orig", None) return "value cannot be null"
if isinstance(orig_error, NotNullViolationError):
return "value cannot be null"
return "database error while saving parameter value" return "database error while saving parameter value"
async def auto_create_browser_session_if_needed( async def auto_create_browser_session_if_needed(