From a33a5e8f7f33a67f4afce4835f6bd16a55fe5d2e Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Thu, 16 Oct 2025 05:10:16 +0700 Subject: [PATCH] fix --- src/aeros_equipment/service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/aeros_equipment/service.py b/src/aeros_equipment/service.py index 96a9996..b3d56c5 100644 --- a/src/aeros_equipment/service.py +++ b/src/aeros_equipment/service.py @@ -130,19 +130,20 @@ async def get_aeros_equipment_by_location_tag(*, location_tag: Union[str, List[s json=aerosNodeReq, headers={"Content-Type": "application/json"}, ) - response.raise_for_status() aerosEquipmentData = response.json() if not aerosEquipmentData: raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, detail="AerosEquipment not found" ) + + response.raise_for_status() df = pd.DataFrame(aerosEquipmentData) return df.drop_duplicates().to_dict('records') - except Exception as e: + except httpx.HTTPStatusError as e: raise HTTPException( status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e) )