Skip to content

Commit

Permalink
Responding to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Cbameron12 committed Jan 28, 2025
1 parent 9989815 commit 5983c27
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/endpoints/singlepoint_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,14 @@ def get_singlepoint(request: SinglePointRequest) -> dict[str, Any]:
"""
base_dir = Path("data")
struct_path = base_dir / request.struct
logger.info(request)
logger.info("Request contents:", request)
try:
results = singlepoint(
return singlepoint(
struct=struct_path,
arch=request.arch,
properties=request.properties,
range_selector=request.range_selector,
)
if "error" in results:
raise HTTPException(status_code=500, detail=results["error"])
return results
except Exception as e:
logger.error(e)
raise HTTPException(status_code=500, detail="Internal Server Error") from e

0 comments on commit 5983c27

Please sign in to comment.