fix(bfl): check HTTP status when downloading image from URL

Add raise_for_status() to avoid sending error page content as image data to BFL API.
This commit is contained in:
Chesars 2026-03-04 23:36:44 -03:00
parent fac6c068a0
commit d693007726

View file

@ -200,6 +200,7 @@ class BlackForestLabsImageEditConfig(BaseImageEditConfig):
if image.startswith(("http://", "https://")):
# Download image from URL
response = httpx.get(image, timeout=60.0)
response.raise_for_status()
return response.content
else:
# Assume it's a file path