File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ async def return_project_by_id(
210210
211211 project = project_raw .scalar_one_or_none ()
212212 if project is None :
213- return Response (status_code = 404 )
213+ raise HTTPException (status_code = 404 , detail = "Project not found" )
214214
215215 return ProjectResponse .from_model (project )
216216
@@ -235,7 +235,7 @@ async def link_hackatime_project(
235235
236236 project = project_raw .scalar_one_or_none ()
237237 if project is None :
238- return Response (status_code = 404 )
238+ raise HTTPException (status_code = 404 , detail = "Project not found" )
239239
240240 if hackatime_project .name in project .hackatime_projects :
241241 raise HTTPException (
@@ -324,7 +324,7 @@ async def unlink_hackatime_project(
324324
325325 project = project_raw .scalar_one_or_none ()
326326 if project is None :
327- return Response (status_code = 404 )
327+ raise HTTPException (status_code = 404 , detail = "Project not found" )
328328
329329 if hackatime_project .name not in project .hackatime_projects :
330330 raise HTTPException (
You can’t perform that action at this time.
0 commit comments