Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(backend): Fix failure of get_graph_metadata call on SmartDecisionMaker.py

Zamil Majdy91b1cc90aa75
diff --git a/autogpt_platform/backend/backend/blocks/smart_decision_maker.py b/autogpt_platform/backend/backend/blocks/smart_decision_maker.py
index 01215d3118..f1c779ac5b 100644
--- a/autogpt_platform/backend/backend/blocks/smart_decision_maker.py
+++ b/autogpt_platform/backend/backend/blocks/smart_decision_maker.py
@@ -184,7 +184,7 @@ class SmartDecisionMakerBlock(Block):
raise ValueError("Graph ID or Graph Version not found in sink node.")
db_client = get_database_manager_client()
- sink_graph_meta = db_client.get_graph_metadata(graph_id.graph_version)
+ sink_graph_meta = db_client.get_graph_metadata(graph_id, graph_version)
if not sink_graph_meta:
raise ValueError(
f"Sink graph metadata not found: {graph_id} {graph_version}"
diff --git a/autogpt_platform/backend/backend/util/service.py b/autogpt_platform/backend/backend/util/service.py
index 7b6c2b7522..e29a9a5d19 100644
--- a/autogpt_platform/backend/backend/util/service.py
+++ b/autogpt_platform/backend/backend/util/service.py
@@ -441,7 +441,9 @@ def fastapi_get_service_client(service_type: Type[AS]) -> AS:
except httpx.HTTPStatusError as e:
logger.error(f"HTTP error in {method_name}: {e.response.text}")
error = RemoteCallError.model_validate(e.response.json(), strict=False)
- raise EXCEPTION_MAPPING.get(error.type, Exception)(*error.args)
+ raise EXCEPTION_MAPPING.get(error.type, Exception)(
+ *(error.args or [str(e)])
+ )
def close(self):
self.client.close()