🐛 fix(utils.py): add error handling for flow not found in cache when updating build status
This commit is contained in:
parent
88f24d292d
commit
91bfa9a5d3
1 changed files with 2 additions and 0 deletions
2
src/backend/langflow/services/cache/utils.py
vendored
2
src/backend/langflow/services/cache/utils.py
vendored
|
|
@ -207,5 +207,7 @@ def save_uploaded_file(file: UploadFile, folder_name):
|
||||||
|
|
||||||
def update_build_status(cache_service, flow_id: str, status: BuildStatus):
|
def update_build_status(cache_service, flow_id: str, status: BuildStatus):
|
||||||
cached_flow = cache_service[flow_id]
|
cached_flow = cache_service[flow_id]
|
||||||
|
if cached_flow is None:
|
||||||
|
raise ValueError(f"Flow {flow_id} not found in cache")
|
||||||
cached_flow["status"] = status
|
cached_flow["status"] = status
|
||||||
cache_service[flow_id] = cached_flow
|
cache_service[flow_id] = cached_flow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue