We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dca5dd1 + 3398849 commit 1b0c53eCopy full SHA for 1b0c53e
app/service/plant_service.py
@@ -55,11 +55,11 @@ async def get_plant_type(botanical_name: str) -> Optional[PlantTypeSchema]:
55
else:
56
return response.raise_for_status().json()
57
58
- except Exception as e:
+ except HTTPStatusError as e:
59
logger.error(
60
"Plant service cannot be accessed because: " + str(e)
61
)
62
raise HTTPException(
63
- status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
64
- detail="Plant service service cannot be accessed",
+ status_code=e.response.status_code,
+ detail=e.response.content,
65
0 commit comments