Skip to content

Commit

Permalink
fix: raise HTTPException if data extract fails
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 8, 2024
1 parent 8562168 commit 67e7dc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit 67e7dc3

Please sign in to comment.