Skip to content

Commit 1b0c53e

Browse files
committed
Merge branch 'HAN-50' into HAN-55
2 parents dca5dd1 + 3398849 commit 1b0c53e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/service/plant_service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ async def get_plant_type(botanical_name: str) -> Optional[PlantTypeSchema]:
5555
else:
5656
return response.raise_for_status().json()
5757

58-
except Exception as e:
58+
except HTTPStatusError as e:
5959
logger.error(
6060
"Plant service cannot be accessed because: " + str(e)
6161
)
6262
raise HTTPException(
63-
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
64-
detail="Plant service service cannot be accessed",
63+
status_code=e.response.status_code,
64+
detail=e.response.content,
6565
)

0 commit comments

Comments
 (0)