Cizz22 3 months ago
parent a33a5e8f7f
commit 87277aff20

@ -132,6 +132,8 @@ async def get_aeros_equipment_by_location_tag(*, location_tag: Union[str, List[s
)
aerosEquipmentData = response.json()
raise Exception(aerosEquipmentData)
if not aerosEquipmentData:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND, detail="AerosEquipment not found"
@ -143,7 +145,7 @@ async def get_aeros_equipment_by_location_tag(*, location_tag: Union[str, List[s
return df.drop_duplicates().to_dict('records')
except httpx.HTTPStatusError as e:
except Exception as e:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)
)

Loading…
Cancel
Save