improve code block failure reason (#1910)

Co-authored-by: lawyzheng <lawyzheng1106@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Shuchang Zheng
2025-03-09 21:50:53 -07:00
committed by GitHub
parent 494e750e91
commit 1f62698350
3 changed files with 24 additions and 1 deletions

View File

@@ -139,3 +139,10 @@ class InsecureCodeDetected(SkyvernException):
super().__init__(
f"Insecure code detected. Reason: {msg}",
)
class CustomizedCodeException(SkyvernException):
def __init__(self, exception: Exception) -> None:
super().__init__(
f"Failed to execute code block. Reason: {exception.__class__.__name__}: {str(exception)}",
)