refactor: suppress ClamAV connection errors and comment out exception handling blocks in service layer

main
Cizz22 3 months ago
parent 2e05a326a1
commit 1c032ffe00

@ -85,18 +85,15 @@ async def import_aro_project(*, db_session: DbSession, aeros_project_in: AerosPr
detail=f"Virus detected: {scan_result['stream'][1]}" detail=f"Virus detected: {scan_result['stream'][1]}"
) )
except clamd.ConnectionError: except clamd.ConnectionError:
raise HTTPException( pass
status_code=500, # except HTTPException:
detail="Antivirus service unavailable" # raise
) # except Exception as e:
except HTTPException: # print(f"ClamAV error: {e}")
raise # raise HTTPException(
except Exception as e: # status_code=500,
print(f"ClamAV error: {e}") # detail=f"Antivirus check failed: {str(e)}"
raise HTTPException( # )
status_code=500,
detail=f"Antivirus check failed: {str(e)}"
)
# Project name hardcode # Project name hardcode

Loading…
Cancel
Save