diff --git a/src/backend/app/projects/project_crud.py b/src/backend/app/projects/project_crud.py
index b795ec2e06..f3702df53f 100644
--- a/src/backend/app/projects/project_crud.py
+++ b/src/backend/app/projects/project_crud.py
@@ -662,7 +662,10 @@ async def get_data_extract_url(
         error_dict = result.json()
         error_dict["status_code"] = result.status_code
         log.error(f"Failed to get extract from raw data api: {error_dict}")
-        return error_dict
+        raise HTTPException(
+            status_code=error_dict.get("status_code"),
+            detail=error_dict.get("detail"),
+        )
 
     task_id = result.json()["task_id"]