Skip to content

Commit

Permalink
fix(backend): minor fixes to HTTPException on endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jul 4, 2024
1 parent 53e3412 commit 2edc114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ async def delete_one_project(db: Session, db_project: db_models.DbProject) -> No
log.info(f"Deleted project with ID: {project_id}")
except Exception as e:
log.exception(e)
raise HTTPException(e) from e
raise HTTPException(status_code=HTTPStatus.CONFLICT, detail=e) from e


async def partial_update_project_info(
Expand Down Expand Up @@ -395,7 +395,7 @@ async def create_tasks_from_geojson(
return True
except Exception as e:
log.exception(e)
raise HTTPException(e) from e
raise HTTPException(HTTPStatus.UNPROCESSABLE_ENTITY, detail=e) from e


async def preview_split_by_square(boundary: str, meters: int):
Expand Down

0 comments on commit 2edc114

Please sign in to comment.