From 4b3563cacd633408d5d3606f8648dbc7b42cbe8b Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Tue, 17 Sep 2024 12:42:34 +0200 Subject: [PATCH] fix(chalice): fixed issues-tracking error handler (#2593) (cherry picked from commit 5d786bde562d209c048ceeb11440da0f25711412) --- api/routers/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/routers/core.py b/api/routers/core.py index 64106bad7..e965f54f1 100644 --- a/api/routers/core.py +++ b/api/routers/core.py @@ -395,10 +395,10 @@ def get_all_issue_tracking_projects(context: schemas.CurrentContext = Depends(OR if error is not None: return error data = integration.issue_handler - if "errors" in data: + if isinstance(data, dict) and "errors" in data: return data data = data.get_projects() - if "errors" in data: + if isinstance(data, dict) and "errors" in data: return data return {"data": data} @@ -410,10 +410,10 @@ def get_integration_metadata(integrationProjectId: int, context: schemas.Current if error is not None: return error data = integration - if "errors" in data: + if isinstance(data, dict) and "errors" in data: return data data = data.issue_handler.get_metas(integrationProjectId) - if "errors" in data: + if isinstance(data, dict) and "errors" in data: return data return {"data": data}