From 647ea2ac0fccda4f9459bb85a52b26cacc59d6f5 Mon Sep 17 00:00:00 2001 From: Kerem Yilmaz Date: Tue, 12 Mar 2024 22:03:32 -0700 Subject: [PATCH] Sync cloud streamlit to open-source streamlit (#54) --- streamlit_app/visualizer/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/streamlit_app/visualizer/api.py b/streamlit_app/visualizer/api.py index a417f9be..654fc015 100644 --- a/streamlit_app/visualizer/api.py +++ b/streamlit_app/visualizer/api.py @@ -3,10 +3,13 @@ from typing import Any import curlify import requests +import structlog from requests import PreparedRequest from skyvern.forge.sdk.schemas.tasks import TaskRequest +LOG = structlog.get_logger() + class SkyvernClient: def __init__(self, base_url: str, credentials: str): @@ -28,6 +31,7 @@ class SkyvernClient: response = requests.post(url, headers=headers, data=json.dumps(payload)) if "task_id" not in response.json(): + LOG.info(f"Failed to create task: {response.text}") return None return response.json()["task_id"]