Skip to content

Commit

Permalink
precommit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorwalton committed Jul 2, 2024
1 parent 52017da commit 10b3773
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/app/connectors/velociraptor/services/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,10 @@ async def post_to_copilot_ai_module(data: ArtifactReccomendationRequest) -> Arti
timeout=120,
)
response_data = data.json()
logger.info(f"Response from copilot-ai-module: {response_data}")

if not response_data.get('success'):
if not response_data.get("success"):
raise HTTPException(
status_code=400,
detail=response_data.get('message', 'Request to copilot-ai-module was not successful'),
detail=response_data.get("message", "Request to copilot-ai-module was not successful"),
)
return ArtifactReccomendationResponse(**data.json())

0 comments on commit 10b3773

Please sign in to comment.