Skip to content

Commit

Permalink
Refactor artifact recommendation error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorwalton committed Jul 2, 2024
1 parent 82b6505 commit a11ccfb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions backend/app/connectors/velociraptor/services/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,5 @@ async def post_to_copilot_ai_module(data: ArtifactReccomendationRequest) -> Arti
json=data.dict(),
timeout=120,
)
data_json = data.json()
if data_json.success is False:
logger.error(f"Failed to get artifact recommendation: {data_json.message}")
raise HTTPException(
status_code=500,
detail=f"Failed to get artifact recommendation: {data_json.message}",
)
logger.info(f"Response from copilot-ai-module: {data.json()}")
return ArtifactReccomendationResponse(**data.json())

0 comments on commit a11ccfb

Please sign in to comment.